LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsh (https://www.linuxquestions.org/questions/linux-newbie-8/rsh-205836/)

rightsidedown 07-16-2004 09:37 AM

rsh
 
Hi All,
I am new to Linux. I installed Red Hat 9. I am trying to get rsh to work. When I try to rsh to this system it comes back with permission denied. I have created a .rhosts with the hostnames. I checked the rsh file and set disable to no. I did a /etc/init.d/xinetd restart but it still didn't work. Am I missing something? Thanks for all of your help.

osvaldomarques 07-16-2004 12:24 PM

There are some more steps to get rsh working. Remember "rsh" is the client side of a remote command. You need to have the server side installed and enabled. First check if "rshd" is installed. After you need to enable it. I think Red Hat use xinetd super server to start rshd. So, you have to edit the file "/etc/xinetd.d/rsh"
Code:

service shell
{
        disable    = no
        flags      = REUSE
        socket_type = stream
        protocol    = tcp
        wait        = no
        user        = root
        server      = /usr/sbin/in.rshd
}

This configuration file comes with "disable = yes". Change it to no and restart xinetd to enable it. After it is enabled, you need /root/.rhosts and /etc/hosts.equiv to have the hosts configured. Both files have to have the same content. It is important the permifissions for both be "0644" (read/write for root and readable by all) otherwise rshd will ignore it.
Last but not least, it's very probable your installation use the "pam package" to control login. So, you have to configure pam.. You need a file named "/etc/pam.d/rsh" with this content:
Code:

#%PAM-1.0
auth      required    /lib/security/pam_rhosts_auth.so
auth      required    /lib/security/pam_nologin.so
account    required    /lib/security/pam_unix.so
session    required    /lib/security/pam_unix.so
~

Good luck!

rightsidedown 07-16-2004 02:21 PM

Thanks for your help Osvaldomarques. From looking at your recommendations I found out that rsh was supposed to be listed in etc/securetty. Once I added that it worked fine. Thanks again.

btmiller 07-16-2004 03:08 PM

You probably ought to be using ssh instead, unless you have some compelling reason to use rsh. The r protocols (rlogin, rsh, etc.) aren't considered secure because everything (including passwords) is transmitted over the network in plain text.


All times are GMT -5. The time now is 09:51 PM.