restricted shell (rssh) bouncing users

Posted on 2009-12-18
Medium Priority
Last Modified: 2012-05-08

I am setting up restricted shell for users and am having problems. Users use key access to the server. If I use /bin/bash as their shell all works fine for login. When I change their shell to /usr/bin/rssh it logs them in then immediacy closes the session.

[root@site:/]$ tail /var/log/secure
Dec 18 12:36:30 ip-10-245-83-3 sshd[17227]: Accepted publickey for siteadm from port 35593 ssh2
Dec 18 12:36:30 ip-10-245-83-3 sshd[17227]: pam_unix(sshd:session): session opened for user siteadm by (uid=0)
Dec 18 12:36:30 ip-10-245-83-3 sshd[17227]: pam_unix(sshd:session): session closed for user siteadm
Dec 18 12:37:03 ip-10-245-83-3 sshd[17233]: Connection closed by

Can someone help me figure out why this shell is not working for users?
Question by:td234
1 Comment
LVL 68

Accepted Solution

woolmilkporc earned 2000 total points
ID: 26082545

rssh is not meant for interactive sessions.

It will only allow for scp, sftp, cvs, rdist and rsync via ssh.

You can easily check this behaviour byjust entering /usr/bin/rssh at the commandline.

Use rssh only for the above non-interactive commands, for interactive sessions use a normal restricted shell such as rbash or rksh.



Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question