Restrict an ssh user to scp only access
Today I did a bit of research on how to restrict an ssh user to only have scp access. Basically all you have to do is add command="/usr/lib/openssh/sftp-server" to the beginning of the user’s key in ~/.ssh/authorized_keys like so:
command="/usr/lib/openssh/sftp-server" ssh-rsa thekeygoeshere== user@user.local
For more information on how to customize your authorized_keys file check out this helpful site.
Published: 01 Aug, 2008