I have a Ubuntu 14.04 server installed with open ssh. I'd like to configure sftp for customers to be able to download files only. In other words, I put files in a directory that they are jailed to. I need to make sure they can only access the directory with their file(s) and nothing else.
Originally I was going to use vsftpd, but someone told me that sftp is the better option. If there's some documentation on what I need that would be great.
I need help with the following:
- How to configure sftp
- How to set up user accounts and use them for sftp
- How to set accounts to jail
Best Answer
Settings for
/etc/ssh/sshd_config
create group sftp:
Create directory
Create user directly with new sftp group attached:
set permissions for use with ssh for sftp:
restart service:
Note, the home folder for the new sftp user has to be given root owner.