1

I'm trying to configure vsftpd on my vps in order to access SFTP from Transmit/FileZilla. I've opted for SFTP and the OpenSSL is configured, but I can't seem to manage to add a new user only for FTP-accessing and restrict it for the /home directory only.

Thus, the /home is where I keep my WWW server files and I want a new user to have full access to that directory (chroot).

vsftpd is now capable of allowing the root user to access ftp, but I want to restrict that only for a specific username to allow SFTP accessing.

Some info from vsftpd.conf:

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
chroot_list_file=/etc/vsftpd/chroot_list
local_root=/home

ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/vsftpd/vsftpd.pem

chroot_list was the file where I added my user "max" to access FTP, but I've removed the user after multiple times where I tried to have it accessing the SFTP.

vsftpd allows a new user to login, but fails when inserting the password. root is ok.

Also, is there any changes to allow specific IP-address to access SFTP?

Thank you.

1
  • Can you post the exact error message you are getting as an edit to your post?
    – user9517
    Mar 3, 2011 at 10:50

2 Answers 2

3

Sorry but it looks like you are confusing the protocols. I.e. SFTP and FTPS. SFTP is for SSH FTPS is used for and by the FTP server.

If you really want to lock the user down. Add /usr/sbin/nologin /etc/shells (this will stop SSH access) Add your user 'max' to /etc/vsftpd/chroot_list

Configure your filezilla to use FTPS

1
  • SFTP=SSH, SCP, RSYNC over SSH FTPS=FTP+TLS/SSL
    – dmourati
    Apr 20, 2011 at 6:06
0

To get sftp chroot working you could forget about vsftpd and just configure openssh to do that - http://www.techrepublic.com/blog/opensource/chroot-users-with-openssh-an-easier-way-to-confine-users-to-their-home-directories/229

1
  • The guy's on Centos 5. It never got past OpenSSH 4.3. Per the cited article, sftp features were not added to OpenSSH until 4.9.
    – Steve
    Nov 28, 2015 at 2:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .