Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring AIX to use the rcp command

 
Jeff Daigle
Advisor

Configuring AIX to use the rcp command

Hello, I asked this question on 11/26, but I don't think it went through right. Anyway, I am trying to use rcp (remote copy) to move files from one AIX server (server1) to another (server2). Here is the info related to my problem:

Here is what is in /home/myname/.rhosts file on server1:
server2 myname

Here is what is in /home/myname/.rhosts file on server2:
server1 myname

Here is the command I am trying to run from server1:
rcp server1:/home/myname/test.txt server2:/home/myname

When I run this command, it runs for a minute or so, then I get this returned:
server2: Connection timed out


I have looked into this, but I cannot figure out why it will not work correctly. Any help or direction would be greatly appreciated. Thanks, Jeff

15 REPLIES
harry d brown jr
Honored Contributor

Re: Configuring AIX to use the rcp command

"myname" needs to have the SAME userid on both machines!


live free or die
harry
Live Free or Die
Sanjay_6
Honored Contributor

Re: Configuring AIX to use the rcp command

Hi Jeff,

Try,

rcp server1:/home/myname/test.txt username@server2:/home/myname

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: Configuring AIX to use the rcp command

Hi Jeff,

You may try this link too,

http://us-support2.external.hp.com/cki/bin/doc.pl/sid=8bf911441416a7513c/screen=ckiDisplayDocument?docId=200000053249111

It advises you to set .rhosts file permission to 0600 beside some other things.

Hope this helps.

Regds
harry d brown jr
Honored Contributor

Re: Configuring AIX to use the rcp command

Does Server2 know how to resolve Server1's name?

From server2, do an "nslookup server1". Do the same for server2 on server1.

Also, is server2 reachable? Can you ping or telnet server2 from server1?

live free or die
harry
Live Free or Die
Craig Rants
Honored Contributor

Re: Configuring AIX to use the rcp command

Are you logging inetd connections?
Check in /etc/rc.config.d/netdaemons for
INETD_ARGS="-l"

If not make it so, then look at syslog for you connection, see what it says, you may not even be touching the box.

Craig
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Patrick Wallek
Honored Contributor

Re: Configuring AIX to use the rcp command

Try doing it this way:

cd /home/myname
rcp test.txt server2:/home/myname/test.txt

I think part of the problem may be that by specifying 'rcp server1:/home/text.txt server2....' that the rcp is trying to call server1 remotely when you are already there. While it shouldn't be a problem (it worked on my HP boxes), it may be part of your problem. Try the command above and let us know.
Jeff Daigle
Advisor

Re: Configuring AIX to use the rcp command

Hello, thank you all for responses. I will assign pts. shortly. In response to harry d brown jr, the myname is setup is the same on both servers. Also, when I did the "nslookup server1", I got this back:
Server:
*** can't find server2:No response from server

I got the same respons the other way. And, also I tried pinging each server and that fails. This tells me that the two servers aren't seeing each other. However, I can ftp successfully between the two servers, so I'm kind of stumped as to why they can't communicate otherwise. Possibly some network settings I need to check? Thanks much for any help.
Jeff
Patrick Wallek
Honored Contributor

Re: Configuring AIX to use the rcp command

Hmmmm..... Yep I'd say you've got a network problem somewhere.

When you ping the servers did you do so via name or IP address? If you did via name, try with the IP address and see if that works. If it does, there's a problem with DNS or /etc/hosts or whatever method you are using to resolv host names to IP addresses.
Sanjay_6
Honored Contributor

Re: Configuring AIX to use the rcp command

Hi Jeff,

This looks like the system is not able to resolve the name of the remote server. I'm not familiar with the hostname resolution on AIX. On hp we use /etc/hosts, /etc/nsswitch.conf and /etc/resolv.conf file on a node to resolve the ip address and name for the other server. you can add the ip address and name of the remote server in the /etc/hosts file and see if it helps.

Here is a link on using the resolver for ip/hostname resolution on HP.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90147/B2355-90147_top.html&con=/hpux/onlinedocs/B2355-90147/00/00/28-con.html&toc=/hpux/onlinedocs/B2355-90147/00/00/28-toc.html&searchterms=/etc/resolv.conf&queryid=20011129-091048

Hope this helps.

Regds
Jeff Daigle
Advisor

Re: Configuring AIX to use the rcp command

Thanks for the responses. Patrick, I tried pinging both ways- they both fail (100% packet loss). I will look into the networking. I guess I misunderstood. I thought if they can ftp each other, then they must be networked correctly? Apparently, there is more to it (Forgive me, I'm still building experience). Thanks for all the help. Jeff
harry d brown jr
Honored Contributor

Re: Configuring AIX to use the rcp command

Jeff,

At a minimum, find out what kind of "name-resolution" for server names you are using. You can just add server1 to server2's /etc/hosts, and server2 to server1's /etc/hosts file. Then try your ping - unless of course your networking engineers have turned off icmp. Instead of bashing your head against the wall, ask your network engineers what protocols they have blocked and/or opened between the two servers!

live free or die
harry
Live Free or Die
Patrick Wallek
Honored Contributor

Re: Configuring AIX to use the rcp command

Good point Harry! I hadn't thought about that.

Are these machines on the same subnet? It shouldn't matter, but if there is a router involved then Harry has a very valid point.

Make sure that the remote services ports are allowed. These should 512, 513, 514 and 515 (both TCP and UDP) I think. At least on HP-UX, don't know about AIX for sure.

You might also check and make sure that these services are enabled in the AIX equivalent of /etc/inetd.conf and /etc/services. If they aren't enabled, they won't work.

You are correct in that if FTP works then the rest of your networking should work. Can you telnet between the servers? What about remsh or rsh?
W Sanders
Occasional Advisor

Re: Configuring AIX to use the rcp command

The "connection timed out" points toward a firewall issue, assuming the IP address is getting resolved somehow (it still may not be, although if you can ftp but not nslookup you may be resolving the host through NIS or host file. etc).

If rcp were not actually enabled on the other machine (say in inetd.conf) you would see a "connection refused" instead of a timeout as your TCP "three way handshake" succeeded but the machine refused the rcp connection.

The timeout means your handshake itself is not succeeding die to routing, name service, a firewll, or some other problem.
Jeff Daigle
Advisor

Re: Configuring AIX to use the rcp command

Thank you all for the help. Each of these servers has its own router. I learned that each of these two routers needs to have an entry in the ACL (access control list) Table in order to permit the other server to contact it. This is being done, which will basically open up the port that rcp uses.
Thanks for all the help.
Jeff
melvyn burnard
Honored Contributor

Re: Configuring AIX to use the rcp command

You might also consider asking this question in an IBM AIX forum in future, and not an HP-UX forum. This may speed up the problem resolution
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!