SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Thursday, January 10, 2008

Restrict Users to SCP and SFTP and Block SSH Shell Access with rssh

rssh ~ a restricted shell


Restricted shell only allows following operations only:

  • scp - Secure file copy

  • sftp - Secure FTP

  • cvs - Concurrent Versions System ~ you can easily
    retrieve old versions to see exactly which change caused the bug

  • rsync - Backup and sync file system

  • rdist - Backup / RDist program maintains identical copies of files on multiple hosts.


Install rssh


1.CentOS / Fedora / RHEL Linux rssh installation

# cd /tmp
# wget http://dag.wieers.com/rpm/packages/rssh/rssh-2.3.2-1.2.el5.rf.i386.rpm
# rpm -ivh rssh-2.3.2-1.2.el5.rf.i386.rpm

Debian / Ubuntu Linux rssh installation


Use apt-get command:

$ sudo apt-get install rssh

FreeBSD installation



# cd /usr/ports/shells/rssh
# make install clean

Note:By default file will be located at /etc/rssh.conf