Operating System - HP-UX
1752463 Members
5687 Online
108788 Solutions
New Discussion юеВ

Re: remsh and Login incorrect

 
Barakati
Frequent Advisor

remsh and Login incorrect

Hi Guys,

I have two systems Prod1 and Prod2 and I need to use remsh between them to execute some command using root account, I have done the following
*at prod1 server .rhosts file has been created with prod2 root line
*at prod2 server .rhosts file has been created with prod1 root line
*at prod1 /etc/hosts.equiv file has been created with prod2 root line

But when I am trying to execute the following command
prod2# remsh prod1 -l ls /etc

I got the following error
remshd: Login incorrect.

Please advice
5 REPLIES 5
Sajjad Sahir
Honored Contributor

Re: remsh and Login incorrect

Dear Team

please check /etc/inetd.conf and /etc/services
to start remshd from the inetd daemon in a non-secure environment, the configuration file /etc/inetd.conf must contain an entry as follows:

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

please check /etc/services file also

thanks and regards

Sajjad sahir
Basheer_2
Trusted Contributor

Re: remsh and Login incorrect

Dear dba,

This is the way I have and it works
in prod1
#cat .rhosts
prod2 root

in prod2
#cat .rhosts
prod1 root

I am able to do remsh prod1 ls /tmp ( from prod2) and the other way also works ok.

and the perms
ls -ls .rhosts
16 -rw-rw-rw- 1 root sys 742 Mar 6 13:02 .rhosts
Barakati
Frequent Advisor

Re: remsh and Login incorrect

Dears,

thanks for your replay but I have been checked the /etc/services as well as /etc/inetd.conf and they are seems fine
and also .rhosts has been configured right

please find the attachment
*/etc/inetd.conf
*/etc/services
*.rhosts

note that files at prod1

Steven Schweda
Honored Contributor

Re: remsh and Login incorrect

> prod2# remsh prod1 -l ls /etc

Uh, who is user "ls"?

man remsh

Look for "-l".

What happens with a command like this?:

prod2# remsh prod1 ls /etc


> please check /etc/services file also

Please let /etc/services rest in peace.
Mel Burslan
Honored Contributor

Re: remsh and Login incorrect

.rhosts file's permissions might be the problem. r-commands are very finicky in that sense.

Make sure they are located in root's home directory, owned by root:sys and the permissions of these files are 400 on both sides and give a rest to hosts.equiv and /etc/services as they do not play a role in what you are trying to accomplish.

On a side thought, as any sensible unix admin, I also should advise you not to use rlogin, remsh and rexec commands due to their insecure communication structure. Consider using ssh and trusted key based authentication as soon as possible.
________________________________
UNIX because I majored in cryptology...