How to install OpenSSH SFTP server on MXLinux Latest

OpenSSH provides a secure and encrypted communication channel for remote login and file transfer. In this tutorial, we will walk you through the process of installing OpenSSH SFTP server on MXLinux Latest.

Step 1: Update the system

Before installing any package, it is recommended to update the system. Open the terminal and run the following command:

sudo apt-get update && sudo apt-get upgrade

Step 2: Install OpenSSH server

OpenSSH is available in the default repositories of MXLinux. To install OpenSSH server, run the following command:

sudo apt-get install openssh-server

Step 3: Configure OpenSSH server

The default configuration file of OpenSSH server is located at /etc/ssh/sshd_config. Open the configuration file with any text editor of your choice. Find the following line:

#Subsystem sftp /usr/lib/openssh/sftp-server

Uncomment the line by removing the "#" symbol at the beginning and change it to:

Subsystem sftp internal-sftp

This will enable the SFTP server and disable the shell access.

Step 4: Restart OpenSSH server

To apply the changes, restart the OpenSSH server by running the following command:

sudo systemctl restart ssh

Step 5: Create SFTP user

To create an SFTP user, run the following command:

sudo useradd -m -s /bin/false sftpuser

The above command will create an SFTP user named "sftpuser" with a home directory and no shell access. You can replace "sftpuser" with any username of your choice.

Step 6: Set SFTP user password

To set a password for the SFTP user, run the following command:

sudo passwd sftpuser

Follow the on-screen prompts to set the password.

Step 7: Test SFTP connection

To test the SFTP connection, open any SFTP client such as FileZilla or WinSCP. Enter the IP address of the MXLinux machine, port 22, and the SFTP username and password.

Congratulations! You have successfully installed and configured OpenSSH SFTP server on MXLinux Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!