Installing OpenSSH SFTP Server on Pop! OS
OpenSSH is a suite of tools that provides secure remote access to a computer system. It comes with a built-in SFTP (Secure File Transfer Protocol) server that allows you to transfer files securely between a client and server. In this tutorial, we will show you how to install OpenSSH SFTP server on Pop! OS.
Prerequisites
- A running instance of Pop! OS.
Step 1: Installing OpenSSH SFTP Server
Open a terminal window by pressing
CTRL+ALT+Ton your keyboard.Type the following command to update your package list:
sudo apt updateType the following command to install OpenSSH server:
sudo apt install openssh-serverAfter installation is complete, type the following command to start the OpenSSH service:
sudo systemctl start sshType the following command to enable the OpenSSH service to start at boot:
sudo systemctl enable sshVerify OpenSSH is running by typing the following command:
sudo systemctl status sshYou should see the status "active (running)".
Step 2: Configuring OpenSSH SFTP Server
By default, OpenSSH SFTP server is already configured to use the default settings. However, you can modify these settings to your preferences.
Type the following command to open the OpenSSH server configuration file:
sudo nano /etc/ssh/sshd_configLocate the following lines and modify them to uncomment them (remove the #):
#Subsystem sftp /usr/lib/openssh/sftp-server Subsystem sftp internal-sftpTo limit the access of the OpenSSH SFTP server to certain accounts or groups, add the following lines to the end of the file:
# Example to restrict sftp to only one group Match group sftp ChrootDirectory /home/%u X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftpSave and close the file by pressing
CTRL + X, thenY, andENTER.Type the following command to restart the OpenSSH service for the changes to take effect:
sudo systemctl restart ssh
Step 3: Using OpenSSH SFTP Server
Open your favorite SFTP client and connect to your Pop! OS instance using your username and password.
You will be able to browse and transfer files securely between your client and server.
Congratulations! You have now successfully installed and configured OpenSSH SFTP server on Pop! OS.