Installing and configuring rssh to allow only scp and sftp

From Notes_Wiki
Revision as of 05:42, 9 November 2012 by Saurabh (talk | contribs) (Created page with "=Installing and configuring rssh to allow only scp and sftp= We can use yum on CentOS to install rssh. After installing edit file '<tt>/etc/rssh.conf</tt>' and uncomment belo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installing and configuring rssh to allow only scp and sftp

We can use yum on CentOS to install rssh. After installing edit file '/etc/rssh.conf' and uncomment below lines

allowscp
allowsftp

After this use commmand 'usermod -s /usr/bin/rssh <username>' to set default shell for user as rssh. This would force user to use only sftp and scp commands. SSH shell access for user would get completely disabled. 'gftp', 'winscp' and 'ssh secure file transfer client' have been tested with this setup and they all work fine.

After this even using command 'su - <username&gtt;' for restricted users will stop working.


Mounting sftp filesystems

One can always use fuse-sshfs to mount filesystems/folders restricted by rssh on local machine so that user dont have to worry about synchronizing files between server and local machine. One can install 'fuse-sshfs' package on CentOS and then use below command syntax to mount sshfs filesystems

sshfs <user>@<server:[<path>] <mount_point>