Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed rssh on CentOS 5 from RPMForge. Then I tried to change the shell to rssh to one existing user like this:

[root@ddinvps ofertoza]# chsh -s /usr/bin/rssh ofertoza
Changing shell for ofertoza.
Warning: "/usr/bin/rssh" is not listed in /etc/shells
Shell not changed.

OK, I added /usr/bin/rssh to /etc/shells and now I don't get the warning, just this:

[root@ddinvps ofertoza]# chsh -s /usr/bin/rssh ofertoza
Changing shell for ofertoza.
Shell not changed.

Any ideas why would this happen? It's a normal user with /home/ofertoza as home dir. I want to use rssh to restrict the access for sftp/scp to only that dir where will reside the files of one website.

share|improve this question
up vote 2 down vote accepted

just edit and change the /bin/bash into /usr/bin/rssh directly on /etc/passwd

share|improve this answer

The man page for usermod gives the following option:

-s, --shell SHELL
        The name of the user's new login shell. Setting this field to blank
        causes the system to select the default login shell.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.