1826493 Members
3989 Online
109692 Solutions
New Discussion

Re: rcp login incorrect

 
Donald Thaler
Super Advisor

rcp login incorrect

using the command rcp -rp host1:/u02/filex /u00

to transfer file from host1 to host2 (logged in to host2)...

this command worked about 2 months ago and now i get 'remshd login incorrect'....

.rhosts file set up on both systems... rlogin will work but it asks me for a password..

what could have changed that is causing the 'login incorrect' message ???
6 REPLIES 6
John Dvorchak
Honored Contributor

Re: rcp login incorrect

Donald the hint there is that rlogin works but asks you for a password. The .rhosts file on the other end is either not valid anymore or incorrect permissions should be 400 for .rhosts.

When I have a rlogin or remsh problem the first thing I do is telet to the target box. Once there run who -mT to see who it thinks you are and what system you are coming from. Verify that with what's in your .rhosts file.
If it has wheels or a skirt, you can't afford it.
Mel Burslan
Honored Contributor

Re: rcp login incorrect

did you do any network/dns reorganization and the host name were hardcoded somewhere on the hosts file within the past 2 months ?

considering what you have said, on host1, assuming your username is userh2 do you see this entry

host2 userh2

in ~userh2/.rhosts

also are the permissions of this .rhosts file 400 ?
________________________________
UNIX because I majored in cryptology...
AshishJain_USA
Frequent Advisor

Re: rcp login incorrect

Are you able to connect to the other server when you supply the password when prompted. If not, just check if the user is still active on the server and in unlocked condition.

rgds...Ashish
Donald Thaler
Super Advisor

Re: rcp login incorrect

telnet from host2 to host1 returns who -mT value 'host2'

telnet from host1 to host2 returns who -mT
value of the ip address 10.x.x.11 of host1 (why doesn't it return the value 'host1'??

The rlogin works from host1 to host2 but doesn't work from host2 to host1?

Is there another file someplace that is causing the ip address of host1 to be picked up and not the name?

The hosts file of host1 has an entry in it for the ip address 10.x.x.11 associated with
host1a (an alias for host1) and their is an entry for ip address 10.x.x.17 associated with host1. I tried switching host1 and host1a in the hosts file but i got the same results?

There was a network change made about a week ago, but it involved replacing a switch? I'll check with the network admin tomorrow to see if the ip address 10.x.x.11 is hardcoded somewhere in the system.
RAC_1
Honored Contributor

Re: rcp login incorrect

From source to destination, just do plain telnet. Once logged onto dest machine, do
who -um
The name/ip_addr that you see in last column should be in .rhosts file on source machine.
Should be something like follows.

ip_addr/host_name user_name

Check same in other direction.

Hope this resolves it.
There is no substitute to HARDWORK
Bill Hassell
Honored Contributor

Re: rcp login incorrect

When you see an IP and not 'host1', it means that the machine's current DNS setup cannot resolve this IP into a hostname. If you do not use DNS, remove the file /etc/resolv.conf and then only /etc/hosts will be used. If the DNS server is misconfigured, remsh,rcp, and rlogin will request a password if the /etc/nsswitch says to consult DNS first. If a DNS server says it doesn't know 'host1', /etc/hosts will *NOT* be consulted. The nsswitch.conf file specifies the order of resolution. For problems like this, I recommend changing nsswitch.conf to look at /etc/hosts first, then use DNS, then put host1 and host2 in /etc/hosts on both machines.


Bill Hassell, sysadmin