1847401 Members
2940 Online
110264 Solutions
New Discussion

remshd: Login Incorrect

 
SOLVED
Go to solution
The Real MD
Valued Contributor

remshd: Login Incorrect

I know, this old chestnut, having already scoured the ITRC forums for an answer I am having no luck

what I am trying to do is rcp some files from one unix machine to another and I am getting the above error message. The .rhosts file has been setup with hostname:user on both machines but its still not working.

Help

Martin.
15 REPLIES 15
Steven E. Protter
Exalted Contributor

Re: remshd: Login Incorrect

Check DNS.

/etc/nsswtich.conf
/etc/resolv.conf

nslookup the hostname and make sure it matches the actual ip address of the server.

Run a test with the IP address. If it works, you have a DNS problem to deal with.

Look at the log on the target machine for activity as you test.

tail -f /var/adm/syslog/syslog.log

If you see nothing but get the errror, you are not contacting the correct machine.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mister_Z
Frequent Advisor

Re: remshd: Login Incorrect

Hi Martin,

check out the entry for remshd in /etc/inetd.conf, it should look like:

shell stream tcp nowait root /usr/lbin/remshd remshd

Don't forget to issue:
#inetd -c

to update the changes.

HTH,
I work for HP
Uday_S_Ankolekar
Honored Contributor

Re: remshd: Login Incorrect

Apart from suggetions so far, check if rcp account is disabled for some reason. Enable it try rsh or rcp.

-USA..
Good Luck..
The Real MD
Valued Contributor

Re: remshd: Login Incorrect

there is no rcp account in the passwd file.
should there be?
Graham Cameron_1
Honored Contributor
Solution

Re: remshd: Login Incorrect

If the above don't help, you should also check /var/adm/inetd.sec - maybe there is a rule forbidding your access.

- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Uday_S_Ankolekar
Honored Contributor

Re: remshd: Login Incorrect

RCP account I mean is, under what user name you do this rcp ? May be that account is disabled.
Good Luck..
The Real MD
Valued Contributor

Re: remshd: Login Incorrect

I am using root. There is an inetd.sec file on one of the machines. Does this mean if my service isn't listed the rcp wont work?

Uday_S_Ankolekar
Honored Contributor

Re: remshd: Login Incorrect

Try this
1. In .rhosts file try IP address instead of hostnames.
2. In inetd.sec file use hostname or IP address infront of all the services , like login,telnet,exec etc..

3. If the root account is disabled ( less likely) enable it by /usr/lbin/modprpw -k root

Goodluck,
-USA..
Good Luck..
doug mielke
Respected Contributor

Re: remshd: Login Incorrect

Don't forget that the .rhosts file needs to be in the users home dir.

A quick, ( but unsecure) method would be to create /etc/hosts.equiv

use ip addreses, or ensure that
nslookup hostname
can find the hosts in question.
PVR
Valued Contributor

Re: remshd: Login Incorrect

Try to login into the target machine using the same user id and passwd from the machine where you are executing rcp commands. If it works you can ensure that your .rhosts settings are ok.

Check /var/adm/inetd.sec for any line with denying any service like SHELL, LOGIN etc.. If it is so it will not work.

Inetd.sec file is not there in /var/adm means, this service should be allowed by default.

Don't give up. Try till success...
MANOJ SRIVASTAVA
Honored Contributor

Re: remshd: Login Incorrect

Martin

This can also be becasue the name of the server not being resolved properly , in the $home of the user edit the .rhosts file and put

IP AddServer A User Name
IP AddServer B User Name

in both the servers and ensure that the entry is in /etc/hosts .



Manoj
Elmar P. Kolkman
Honored Contributor

Re: remshd: Login Incorrect

The format of the .rhosts file is:
username

And the file needs to be in the homedirectory on the machine you try to connect remotely. So if you want to copy to serverB from serverA, running the rcp command on serverA, the .rhosts needs to be in root's homedirectory on serverB, containing:
serverA root

The permissions on the .rhosts file could also cause a problem: it needs to be 400 or 600 (only accessable by the user itself).

The remote hostname needs to be resolvable and an exact match on both servers. So if you do a nslookup on both servers for the machine running rcp, it needs to be the same.

To make sure it should work, try:
remsh serverB ls
Since rcp and remsh use the same access method, this should give an indication if it works or not. The only difference: remsh asks for a password if no correct .rhosts file is available, while rcp just quits.
Every problem has at least one solution. Only some solutions are harder to find.
cl_5
Frequent Advisor

Re: remshd: Login Incorrect

Hi Martin!

Only an idea.
Create /etc/hosts.equiv file on the target and put in the source host with FQDN. Then try again.

regards
cl
The Real MD
Valued Contributor

Re: remshd: Login Incorrect

thanks for all your suggestions, I will try them all tommorrow.

cheers

Martin
Support PMG
New Member

Re: remshd: Login Incorrect

Hello, I reply on this thread for other people who read this.

you must put in the .rhosts the name that was first found in /etc/hosts:

IP.addr hostname.domain hostname

then, if you put in .rhosts:
hostname user1

then you'll can't connect via remsh !!

and put:
hostname.domain user1

and connect is allowed.