Setup Secure FTP Server

Loading

The deployment is done on Ubuntu 21.X and I’ve updated the packages on the VM prior to running and installing the SFTP package on it.

Install the SSH server on our VM using the command

Start the SSH service and enable the service using the command

Verify the SSH service is running using the command

Configure SSH for SFTP

Open the sshd config using vi editor and add the following settings towards the end of the file as shown

Finally, restart the SSH service

Create SFTP User Account

We will now create an FTP group and FTP user account who want SFTP access. Create a new group by running the below command

Create a new user sftpuser and add the user to sftp group as shown

Set a password for the user

Grant full access to the sftp user on their own home directory using chmod

That completes all the configuration of our SFTP server so let’s test access.

On the client machine, just run the below command

Once you are connected to the SFTP server, you will get the SFTP shell as shown below

(Visited 47 times, 1 visits today)

By Ash Thomas

Ash Thomas is a seasoned IT professional with extensive experience as a technical expert, complemented by a keen interest in blockchain technology.