Additional SFTP access

Add new user. This will create the following:
– a new directory at /home/newuser/
– user and group called newuser

$ sudo adduser newuser

Edit /etc/ssh/sshd_config

#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp

At the end of /etc/ssh/sshd_config

Match User newuser
  PasswordAuthentication yes

Restart SSH

$ sudo service ssh restart

Try and SFTP in.

To change new user’s password.

$ sudo passwd newSFTPuser

References

https://askubuntu.com/questions/134425/how-can-i-chroot-sftp-only-ssh-users-into-their-homes

http://askubuntu.com/a/206376/507748

https://serversforhackers.com/permissions-and-user-management

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s