Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would appreciate any help with the following problem.
I have a system with 3 different computers/OSes.
They are Red Hat Linux Enterprise WS 4.5, LynxOS, and Solaris 8.
I need to be able to do an rsh with a command from the Linux box to the other two. I have made numerous changes which I will describe below, but still no luck with what I need to do. I am doing the rsh as root.
Currently, Linux will rsh with a command to itself, LynxOS will rsh with a command to itself and to Solaris, and Solaris will rsh with a command to itself and to LynxOS. All of them will rsh without a command to each other (basically rlogin). But Linux will not rsh with a command to LynxOS or Solaris and neither LynxOS or Solaris will rsh with a command to Linux. From Linux I get "poll: protocol failure in circuit setup" after several seconds. From LynxOS, I get "host: No route to host". From Solaris, I get "host: connection timed out". Using ssh is not an option since the other two machines do not have it available.
The changes that I have made to Linux are:
verified /etc/xinetd.d/rsh is correct
did chkconfig rexec on
did chkconfig rsh on
did chkconfig rlogin on
Added rsh, rexec, and rlogin to /etc/securetty
restarted xinetd
check iptables file to make sure not part of firewall
added itself and other hosts to /root/.rhosts (made permissions 600 and also tried 644)
Made sure /etc/nologin does not exist
Verified /etc/pam.d/rsh is correct5
Added all 3 hosts to /etc/hosts.allow (e.g. ALL : host)
Added all 3 hosts to /etc/hosts.equiv (e.g. host root)
I have made similar changes to LynxOS and Solaris as appropriate including:
the root home .rhosts
/etc/hosts.allow and /etc/hosts.equiv
You need to make an .rhosts file and populate it with the IP address (or hostname) of the machine that will be rsh-ing
For example...to run something from the Linux machine into the Solaris machine (as root); you will need to make a .rhosts file inside root's home directory and put the IP address of the Linux machine.
Then (as root) you can rsh a command to the Solaris machine (and since you added the .rhosts file inside root's home directory it will run the command as root).
I have a .rhosts file inside the Linux root home directory (/root), inside the LynxOS root home directory (/), and inside the Solaris root home directory (/) with all the hosts names (the host names are inside each machine's /etc/hosts file). I believe that I had at one point tried IP addresses with no luck. It just seems to be the rsh with command that has a problem.
I have a .rhosts file inside the Linux root home directory (/root), inside the LynxOS root home directory (/), and inside the Solaris root home directory (/) with all the hosts names (the host names are inside each machine's /etc/hosts file). I believe that I had at one point tried IP addresses with no luck. It just seems to be the rsh with command that has a problem.
Thanks,
Ken
What errors are you getting? What is the output of the rsh command?
From Linux rsh to LynxOS or Solaris, I get "poll: protocol failure in circuit setup" after several seconds.
From LynxOS rsh to Linux, I get "host: No route to host".
From Solaris rsh to Linux, I get "host: connection timed out".
I have since done some digging and found the following which has helped.
If I disable the firewall on Linux (iptables) OR add TCP ports 1011 - 1023 to the accept list, the rsh from Linux to LynxOS or Solaris works.
But the rsh from Solaris to Linux will only seem to work if I disable the firewall on Linux.
I see an item in the solaris /etc/services for something to do with security, but nothing in the linux /etc/services.
Thanks,
Ken
Not sure why port 975...
I had a similar problem (rsh-ing from Solaris to Linux). So I tried rsh-ing from Solaris to Linux and fired up my packet sniffer (wireshark) and found out that Solaris was trying to rsh on port 975 to the Linux box. So I opened up post 975 on my Linux firewall, and it worked!
Hopefully it works for you...but if it doesn't i HIGHLY suggest using a packet sniffer to find out what the problem is.
FWIW Solaris has a "built-in" packet sniffer - man snoop for more information...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.