Difference between revisions of "Installing and configuring rssh to allow only scp and sftp"

From Notes_Wiki
m
m
 
Line 1: Line 1:
<yambe:breadcrumb self="Installing and configuring rssh to allow only scp and sftp">Rssh configuration|Rssh configuration</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Security tools]] > [[Securing remote shell access]] > [[Rssh configuration|rssh configuration]] > [[Installing and configuring rssh to allow only scp and sftp]]
=Installing and configuring rssh to allow only scp and sftp=


=Installing and configuring rssh=
We can use yum on CentOS to install rssh. After installing edit file '<tt>/etc/rssh.conf</tt>' and uncomment below lines
We can use yum on CentOS to install rssh. After installing edit file '<tt>/etc/rssh.conf</tt>' and uncomment below lines
<pre>
<pre>
Line 22: Line 22:




<yambe:breadcrumb self="Installing and configuring rssh to allow only scp and sftp">Rssh configuration|Rssh configuration</yambe:breadcrumb>
 
 
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Security tools]] > [[Securing remote shell access]] > [[Rssh configuration|rssh configuration]] > [[Installing and configuring rssh to allow only scp and sftp]]

Latest revision as of 14:36, 24 March 2022

Home > CentOS > CentOS 6.x > Security tools > Securing remote shell access > rssh configuration > Installing and configuring rssh to allow only scp and sftp

Installing and configuring rssh

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>



Home > CentOS > CentOS 6.x > Security tools > Securing remote shell access > rssh configuration > Installing and configuring rssh to allow only scp and sftp