How to setup SFTP server on Ubuntu 20.04 Focal Fossa Linux - LinuxConfig.org

In this guide, we will show you how to setup an SFTP server using VSFTPD on Ubuntu 20.04 Focal Fossa. If you haven't already, check out our tutorial on How to setup FTP server on Ubuntu 18.04 Bionic Beaver with VSFTPD, as this article on SFTP assumes that you've applied the configuration covered in the FTP guide.


This is a companion discussion topic for the original entry at https://linuxconfig.org/how-to-setup-sftp-server-on-ubuntu-20-04-focal-fossa-linux

Can you confirm this is really using VSFTPD
You show ForceCommand internal-sftp
Surely this is then using the internal SFTP code of the OpenSSH-Server?
Thanks
John

what is sftp://127.0.0.1?

how to delete account from this?

Hi Saraswati_Awasthi,

Welcome to our forums.

sftp://127.0.0.1 is the URL that points to your local machine (127.0.0.1 is the loopback address of any computer), using sftp protocol. So by issuing it in Nautilus you basically say “I want to connect to my localhost using sftp”.

To delete the account created during the tutorial, you can execute:

$ sudo userdel -r sftpuser

Which will remove the user and it’s home directory, including contents.

after completing your tutorial for SFTP I’m not able to connect to my SSH server anymore. Please take a look at the reply and give me a solution please:
This service allows sftp connections only.

Hi Niko,

Welcome to our forums.

In the tutorial, at the step 3 where the /etc/ssh/sshd_config is modified, a per-group override is given to the sftp user group - they are allowed to use the SFTP service only.

So the solution is either you remove the user that needs to use ssh from the sftp group, or add the user to another ssh-allowed group.

Thanks for the tutorial. Following this step by step allows me to log in as the sftpuser. However, it also allows that user to have access to all the users directories under /home if the default permissions are used on those folders. So please be aware you could be creating a security risk.