I had the same problems and finally solved it 10 minutes ago.
You have to make sure of 4 things (3 if not root):
- That you have a file
.rhosts in the home directory of the rsh server for the user you are trying to rsh under. The .rhosts file contains a line per machine that will be allowed a passwordless login. So if john would rsh w/o a password, then on the rsh server you will have /home/john/.rhosts like:
Code:
# cat /home/john/.rhosts
host1
host2
... john can then rsh w/o a password from host1 and host2.
- That the user you are rsh-ing under must have a login shell on the rsh server machine, like /bin/bash ... something like /sbin/nologin for exameple will give you errors. So make sure that john has a login shell or change it with:
Code:
# usermod -s /bin/bash john
- If you want root to rsh w/o a password, then add 3 lines in /etc/securetty on the rsh server with "rlogin", "rsh" and "rexec" (or only the first 2):
Code:
# cat /etc/securetty
....
tty11
rlogin
rsh
rexec
- you MUST be the user who is rsh'ing under on the machine you are rsh'ing from... meaning, if you are root and you do:
Code:
# rsh -l john node001 ls /tmp
Permission denied.
... you will get a "permission denied" error. You must be john and then rsh ... (weird, i know ... why is the "-l <user>" option there for then?)
And of course the /etc/hosts and /etc/hosts.equiv thingies ...
Hope this helped. Cheers,
Bogdan