restricted shell (rssh) bouncing users

Posted on 2009-12-18
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


    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

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now