.com/.com/.com/

Thursday, 25 February 2016

How To Install & Configure rssh on CentOS/RHEL 6x

linux-restricted-shell

Q. What is rssh ?

Ans: rssh is a restricted shell for use with OpenSSH, allowing only scp or sftp. It now also includes support for rdist, rsync, & cvs. For example, if you have a server which you only want to allow users to copy files off of via scp, without providing shell access, you can use rssh to do that.rssh is a Restricted Shell for Providing Limited Access to a host via ssh, it allows following Operations only :

1. scp - Secure file copy
2. sftp - Secure FTP
3. cvs - Concurrent Versions System ~ you can easily retrieve old versions to see exactly which change caused the bug
4. rsync - Backup & sync file system
5. rdist - Backup / RDist program maintains identical copies of files on multiple hosts.

Step: 1. Install rssh :

For CentOS :

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

For Ubuntu :

# apt-get -y install rssh

Step: 2. Grant Access to SFTP & SCP for all Users by Appending :

Note: By default rssh locks down everything including any sort of access.

# vi /etc/rssh.conf

Uncommented:

allowscp
allowsftp

-- Save & Quit (:wq)

Step: 3. Restart the SSHD Service :

# service sshd restart

Step: 4. Create A New User with "/usr/bin/rssh" shell :

# useradd -m -d /var/www/html/koushik.com -s /usr/bin/rssh koushik
# passwd koushik

New password:
Retype new password:

Step: 5. Change User's Shell bash to rssh :

# usermod -s /usr/bin/rssh user_name
or
# chsh -s /usr/bin/rssh user_name

Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog

1 comment:

  1. blogger_logo_round_35

    If AVG service is not responding then in order to get this fixed first of all get your system restarted. If the issue still continues then in that case conduct a repair of the software and the issue will be resolved.
    www.avg.com/activate
    Avg Support Number UK
    AVG Help Number UK

    ReplyDelete

Copyright © 2016 Kousik Chatterjee's Blog