Marius van Witzenburg We fight for our survival, we fight!

9Jun/110

How to restrict users to SFTP only instead of full SSH access

In case you want users to have access to files on your server but you don't want them to be able to execute commands you can limit them to sftp only access.

Add a user to your system like you normally do with an password and then run the following command:

usermod -s /usr/libexec/sftp-server username

Then change add the following to /etc/shells to make it a valid shell:

echo '/usr/libexec/sftp-server' >> /etc/shells

Now this user can only run the sftp server as shell :)

Posted by mariusvw

Geëtiketeerd als: , , Laat een reactie achter
Reacties (0) Trackbacks (0)

Nog geen reacties


Leave a comment

(required)

Nog geen trackbacks.