1846606 Members
1857 Online
110256 Solutions
New Discussion

rcp command

 
Donna Powell
Advisor

rcp command

I am trying to rcp from an 11.0 box to an 11.i box and I keep getting, remshd: login incorrect.
My .rhosts file is in place on both systems and my hosts files on both system recognize each other. I have also reset the passwd on both hosts to be the same and I am still getting this error message. Any suggestions
7 REPLIES 7
Justo Exposito
Esteemed Contributor

Re: rcp command

Hi Donna,

Can you do an rlogin from one host to the other?

The .rhost file are in the user home directory?

Regards,

Justo.
Help is a Beatiful word
Steve Lewis
Honored Contributor

Re: rcp command

If you are trying this as root and have /etc/securetty set to console, then you won't be able to rcp or rlogin.
If its another user then check the host lookup settings using nslookup.
If you are using NIS or NIS+, then ensure that all recent changes have been propogated.
Darrell Allen
Honored Contributor

Re: rcp command

Hi Donna,

It's probably a name resolution issue. Try this:
rlogin to the remote system, even if you have to give the password.
Run "who am i -u". Note the last field. It is how the remote system knows the system you "rlogin-ed" from. That's the name you need to specify in your .rhosts file on the remote system.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Frank Slootweg
Honored Contributor

Re: rcp command

[Only the .rhosts file on the remote machine is relevant.]

The .rhosts file should be owned by the user in whose home directory it is, i.e. ~franks/.rhosts should be owned (UID) by franks.

You can (temporarily) eliminate name-resolution problems by using IP-addresses, i.e. both in the .rhosts file and in the rcp(1) command.

General: rcp(1), rlogin(1) and remsh(1) all use .rhosts (or hosts.equiv), so if you have a problem with one of those, it is best to use a very simple command like:

remsh remote_host date

That should *not* ask for a password and should return the date/time. If so, .rhosts c.q. hosts.equiv is OK.
Tim D Fulford
Honored Contributor

Re: rcp command

telnet/rlogin from one box to other & do

who -u

The last column is where you came from, put that in the .rhosts

Repeat the in reverse if you wish

Tim
-
Hartmut Lang
Trusted Contributor

Re: rcp command

Addtion to Franks post:

"The .rhosts file should be owned by the user in whose home directory it is ..."

AND
it has to readable by group and world
AND
it must not(!) be writeable by group and world.
(-rw-r--r--)

Hartmut
PIYUSH D. PATEL
Honored Contributor

Re: rcp command

Hi,

The remshd dameon is started by inetd, so you wouldn't see it running all the time. The fact that the user got a "Login incorrect" means that the user has connected the remshd daemon on the remote host but the authentication failed, either because the /etc/hosts.equiv, .rhosts files don't exist/are wrong or no password entry exists for the user on the remote machine. Typically if everything else is correct, this winds up being a hostname lookup issue. Try specifying the IP address in the .rhosts file and then try the FQHN (hostname.domain) and finally just the hostname.

Try reverse looking up the IP address of the client system and using whatever is returned first in .rhosts on the server. If the client is multi-homed ensure you've got the IP address of the correct interface.

Piyush