Video Tutorial - Use rssh to Create an SFTP-only SSH Account
If you want to do secure file transfer between your machine and some other machine, SFTP (SSH File Transfer Protocol) is a good choice. SFTP, as the acronym suggests, runs atop the SSH secure login system and so benefits from the extremely strong encryption that SSH uses.
This does introduce a problem, however. What if you want to set up a user that is allowed to transfer files, but that you don’t want to be able to login and issue commands directly to the machine with SSH?
A program called rssh provides a solution to this problem. You can set a user’s shell to the rssh program and it will prevent them from running anything other than what you specify.
In this video tutorial, I will show you in just under ten minutes, how to set up a simple rssh-protected user that can log in and transfer files with SFTP (or SCP), but that cannot log in via SSH and run commands.
You will need a Linux (or similar) system, a little bit of command line experience and some existing experience with SSH to follow this video tutorial.
Note: In the video, I note that the execute permission is not set for /usr/bin/rssh by default and change the binary to have execute and read permissions by all users (chmod a+x /usr/bin/rssh). It would probably be more appropriate to add the user test to the rsshusers group, rather than taking this step. Both approaches will work, but the second prevents users accidentally running rssh and appearing to have locked themselves out.





