Can you use SFTP with VSFTPD

22,378

SFTP establishes a connection over SSH protocol. If you have openssh-server installed you can connect with any system user and password as long as this function was not disabled in /etc/ssh/sshd_config. It is not related to vsftp.

Add new users:

sudo adduser username

Then connect to the system:

ssh username@host
sftp localhost

You will be prompted for a password for all commands above.

Update: How to jail users to their home with sftp can be found here.

Share:
22,378

Related videos on Youtube

Newfoundland
Author by

Newfoundland

Updated on September 18, 2022

Comments

  • Newfoundland
    Newfoundland over 1 year

    I have installed vsftpd on my Ubuntu 16.04 server, and can connect fine using SFTP for a single user.

    I want to set up additional users and give them the ability to connect to their home directories (or a sub directory of that), via SFTP too. I also want to (chroot) jail them so they cannot navigate outside of this directory they are redirected to on login.

    I've spent a lot of time reading about, and configuring the /etc/vsftpd.conf file, but cannot get this to work with SFTP in the way I have described, and believe that therefore it is only for FTP - am I correct in this statement, and if so, does anyone know of a solution? I really would prefer to use SFTP rather than the hassle of FTPS.

    Many thanks

  • Thomas Ward
    Thomas Ward over 6 years
    This doesn't jail the user as the OP is requesting.
  • Newfoundland
    Newfoundland over 6 years
    Hi, thanks for getting back that's useful - yes, I also need to jail users to their home directory (thank you Thomas)