Operating System - HP-UX
1752707 Members
6139 Online
108789 Solutions
New Discussion юеВ

Re: 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 15
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