LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 07-21-2008, 02:36 PM   #1
khenson1
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Rep: Reputation: 0
Question Unable to do rsh with command


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

Thanks,

Ken
 
Old 07-21-2008, 05:24 PM   #2
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
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).

-C
 
Old 07-22-2008, 07:24 AM   #3
khenson1
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the input.

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
 
Old 07-22-2008, 09:41 AM   #4
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by khenson1 View Post
Thanks for the input.

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?

-C
 
Old 07-23-2008, 06:58 AM   #5
khenson1
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
From the original post

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.

Thanks,

Ken
 
Old 07-23-2008, 10:36 AM   #6
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by khenson1 View Post
But the rsh from Solaris to Linux will only seem to work if I disable the firewall on Linux.
On the Linux firewall open 975:tcp


-C

Last edited by custangro; 07-23-2008 at 12:13 PM.
 
Old 07-25-2008, 07:38 AM   #7
khenson1
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the suggestion.

I will try it the next chance I get.

Out of curiousity, why tcp port 975?

I see an item in the solaris /etc/services for something to do with security, but nothing in the linux /etc/services.

Thanks,

Ken
 
Old 07-25-2008, 09:57 AM   #8
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by khenson1 View Post
Thanks for the suggestion.

I will try it the next chance I get.

Out of curiousity, why tcp port 975?

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...

You can try using that...

-C
 
Old 07-31-2008, 09:40 AM   #9
khenson1
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Opening TCP port 975 did not work, but thanks for the idea.

I have not had time to try the packet sniffer yet, but hope to soon.

Thanks,

Ken
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsh command rehan999 Linux - Software 5 03-25-2008 04:04 PM
Unable to rsh or ssh- connection refused mixxalot Linux - Networking 3 11-24-2007 09:45 PM
unable to do rsh as root. cool244 Linux - Enterprise 2 03-28-2005 03:50 PM
unable to rsh to the localhost majalee Linux - Networking 0 08-20-2004 01:37 AM
rsh is not support interior command ?? Linuxjia Linux - Newbie 1 03-24-2004 10:07 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 11:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration