Operating System - Tru64 Unix
1829121 Members
2055 Online
109986 Solutions
New Discussion

Unable to rsh / rcp

 
James Chua_1
Occasional Advisor

Unable to rsh / rcp

Hi all,
I'm facing a problem which I hope someone out there can point me in the right direction.

Server1 and server2 are located in location1 and server3 is located in location2 connected via WAN.

Server2 has no problem rsh / rcp to server3 but not server1 - it simply hangs.

I've checked all the relevant files .rhosts, /etc/hosts.equiv, /etc/hosts -all have each others' entries.

Both server1 and server2 can ping and telnet to server3 and there are no issues with firewall settings.

What else do I need to check / set to enable server1 to rsh /rcp to server3?

Thanks
James

21 REPLIES 21
Ralf Puchner
Honored Contributor

Re: Unable to rsh / rcp

first check the nameresolution and the protection of .rhosts (see man page of .rhosts for correct permissions)

what is the exact hostname of server1?
Help() { FirstReadManual(urgently); Go_to_it;; }
Caesar_3
Esteemed Contributor

Re: Unable to rsh / rcp

Hello!

Could be that there is firewall that block
connections from server1 to server3

Caesar
James Chua_1
Occasional Advisor

Re: Unable to rsh / rcp

Hi Ralf and Caesar,

Thanks for your reply.

Ralf : I've checked the protection of .rhosts and it's 600. I've also checked the hostname and there are no discrepancies among all the servers.

Caesar : It couldn't have been a firewall policy problem as I've tried a new connection from Server1 and server2 to server4 with all services opened. Server1 and server2 can telnet to server4. Server2 can rsh to server4 but server1 cannot rsh to server4. This leads me to conclude that rsh/rcp is not working for server1. But how do I confirm this?

Thanks & regards
James
Ralf Puchner
Honored Contributor

Re: Unable to rsh / rcp

Hi James,

is it possible that there is an additional router between server 1 and server 3?
is the traceroute output the same?

Are the OS-Versions equal? try to disable ptmu_enabled on server2 and server3(dxkerneltuner modul inet). maybe this solves your problem.

Help() { FirstReadManual(urgently); Go_to_it;; }
James Chua_1
Occasional Advisor

Re: Unable to rsh / rcp

Hi Ralf,

Thanks for the reply.

I've done a traceroute and there are no routers between server1 & server3. The result basically look like this :

server1 -> gateway -> server3

Both server1 and server2 are on Tru64 ver 5.1A but server3 is running AIX.

The strange thing is : server2 has no problems at all.

Thanks & regards
James
Joris Denayer
Respected Contributor

Re: Unable to rsh / rcp

James,

Until now, you tried always to start R-commands to server3.

Is rcp/rsh from server1 to server2 working ?
Or from server1 on itself ?

If this works correctly, I suppose you must verify settings on Server3.
If it doesn't, then we should concentrate on Server2

Can you also check if the corresponding daemons (rshd, rlogind) are started on Server3 when the session hangs on Server2 ?

Rgrds

Joris
To err is human, but to really faul things up requires a computer
Ralf Puchner
Honored Contributor

Re: Unable to rsh / rcp

James,

are the ping responds as fast as from server2?
(e.g. ping server3)

check the rsh permissions/owner on server1 and server2. have you checked the nameresolutions on server3 for server1? (e.g. shortname, longname, IP-adress)

try to disable the pmtu_enabled on server1 as suggested.

If there is no clue, use tcpdump to trace the connection.
Help() { FirstReadManual(urgently); Go_to_it;; }
Don Nutt
Advisor

Re: Unable to rsh / rcp

A lot of good info has already been forwarded, however, have you checked inetd.conf to insure that the RSHD(shell) and RLOGIND(login) have not been commented out? I am sure this has been checked..... but a thought.

Are you using TCPwrappers?

I know some organizations due not prefer these services and want SSH/SCP used in place.


Don
James Chua_1
Occasional Advisor

Re: Unable to rsh / rcp

Hi Joris, Ralf & Don,

Thanks for all your replies.

Joris : rsh/rcp between server1 & server2 is ok. Server2 can rsh/rcp to server3 but not server1. So I guess the problem lies in server1 itself. I did a "ps aux" on server3 but was not able to see any rshd/rlogind daemon. Does that mean that no such daemon is running? If so, why is server2 able to rsh/rcp to server3?

Ralf : ping time between server1 & server3 is abt 340ms. Ping time between server2 & server3 is also about 340ms. rsh permissions/owner of both server1 & server2 are identical. The are also no problems with the hostname & IP address. How do I disable pmtu_enabled?

Don : I've checked inetd.conf in all the 3 servers and I don't see any rsh/rcp entries. However, shell & login entries are there and they are not commented. Do I have to add in rsh/rcp entries?

Thanks & regards
James
Ralf Puchner
Honored Contributor

Re: Unable to rsh / rcp

its was described in my previous postings: pmtu_enabled=0 must be set in the inet submodul via dxkerneltuner or sysconfigtab.
Help() { FirstReadManual(urgently); Go_to_it;; }
James Chua_1
Occasional Advisor

Re: Unable to rsh / rcp

Hi Ralf,

There were no pmtu_enabled entries in server1 or server2. Do I need to put it in?

Thanks & regards
James
Ralf Puchner
Honored Contributor

Re: Unable to rsh / rcp

Ok James,

back to the roots....

sysconfig -q inet will give you a clue if this parameter is set.

use dxkerneltuner to change this value on the fly and in the configuration file /etc/sysconfigtab.

If it is not in sysconfigtab, then the default of 1 will be used.

Hope this helps...
Help() { FirstReadManual(urgently); Go_to_it;; }
James Chua_1
Occasional Advisor

Re: Unable to rsh / rcp

Hi Ralf,

Thanks for the tip.

Question is : why is this setting necessary?

Server2 did not have this setting and it was able to rsh alright to server3.

Regards


James Chua_1
Occasional Advisor

Re: Unable to rsh / rcp

Hi Ralf,

Sorry. Let me correct myself.

pmtu_enabled was set to 1 in server2 and yet it was able to connect to server3.

Anyway, I will give it a try and revert.

Thanks & regards
James Chua_1
Occasional Advisor

Re: Unable to rsh / rcp

Just out of curiousity :

any reason why I can telnet from server1 to server3 without any problems but encountered error : "server3: Connection timed out" when I do a rsh from server1 to server3?

Any missing settings/entries that could have caused that error?

Thanks & regards
James
Ralf Puchner
Honored Contributor

Re: Unable to rsh / rcp

Hi James,

why jumping around without doing troubleshooting. In the answers are a lot of information about things to check.

Please go through it and give us a clue what have worked and what failed. If nothing helps start creating a trace of the network connection.
Help() { FirstReadManual(urgently); Go_to_it;; }
James Chua_1
Occasional Advisor

Re: Unable to rsh / rcp

Ralf,

I am not jumping.

I just find it strange that the server behaved this way.

If you have read my pevious replies, you would have known that I have tried all the helpful hints provided and nothing seems to help.

I will find an alternative soultion to the problem.





Ralf Puchner
Honored Contributor

Re: Unable to rsh / rcp

James,

if you have checked all the mentioned things please start creating a network trace.

btw. I can not find an answer for the pmtu parameter and inetd.conf questions. All other entries jumps back to the starting of the thread or repeats already known behaviours.

regards

ralf
Help() { FirstReadManual(urgently); Go_to_it;; }
Volker Borowski
Honored Contributor

Re: Unable to rsh / rcp

ok, new approach:


Server2 has no problem rsh / rcp to server3 but not server1 - it simply hangs.


1) Since Server 1 and server 2 are in the same location (are they in teh same network ?) no firewall issue appears to be relevant.

2) Since Server 2 can connect to Server three, a correct client setup can be assumed for Server 2

3) This suggests a wrong/defective server/daemon configuration on server 1.

Now: Can you connect from server 1 to server 1 with r-tools using either the hostname or the loopback address ?
"rsh localhost" or "rsh 127.0.0.1" on Server 1 should work. If not the problem surely lies (confirmed) within server 1.

Second: Two options may be used to connect via r-shell. a) an rshd or a remshd is permanently running -> Should be locatable with ps-command ! b) inetd starts the proper daemon when the connect is issued.
==> You stated, that the entries in inetd.conf for shell and login are equivalent to the other servers.
-> this suggests b) to be your method of starting the proper daemon.

At this point, only /etc/services would be left. Check if the inetd.conf entry has a correct corresponding service-entry in /etc/services. Check using
"netstat -an | grep LISTEN"
if you machine is listening on the numeric port you found out by following inetd.conf to /etc/services.
If you have no LISTEN-entry for the shell port, your machine does not accept requests on the shell-port.

If you have an entry, check with "netstat -n" and "ps" while you are trying to connect from the other machine:
1) You should see remshd/rshd processes being started -> This suggests the inetd-configuration beinig correct
2) You should see netstat-connect tions to the shell-port with a status. "TIME-WAIT" or "SYNC" or anything other than "ESTABLISHED" suggests network setup problems.

It might be of help if you attach some of your debugging output to your next message. At least the inetd.conf of your machine in charge would be helpfull. Attached output of "netstat -an" and "ps -ef" while you try to connect to the machine might be interesting as well.

Hope this helps
Volker
Aco Blazeski
Regular Advisor

Re: Unable to rsh / rcp

Hi James,

Check on server1 if cluster sw is running. If so,
then in .rhosts on server 3 you should add cluster hostname of server1.
I had this problem this morning and finally found out after 2 hours troubleshooting #:-|

BR,
Aco
Jerry Jesiolowski
Occasional Advisor

Re: Unable to rsh / rcp

James,
I am having the same problem. Did you ever find a solution. Thanks Jerry