Operating System - HP-UX
1827293 Members
1579 Online
109717 Solutions
New Discussion

Can remsh localhost, but not to hostname...

 
Lee Harris_5
Valued Contributor

Can remsh localhost, but not to hostname...

Hi,

I'm trying to remsh or rcp to the local machine. I can execute the command:

# remsh localhost date

..and this works ok. However if I do any of the following commands:

# remsh hostname date
# remsh ip_address date
# remsh hostname.domain date

None of these work. There is no error, and the return code from the command is 0. The user's .rhosts files contains just + and name resolution is working fine.

Any ideas?

Many Thanks - Lee
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Can remsh localhost, but not to hostname...

shalom,

check hosts.equiv
.rhosts

Host Name Resolution on the system so the hostname you are using resolves to an IP address.

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
Lee Harris_5
Valued Contributor

Re: Can remsh localhost, but not to hostname...

Hi,

As I said, name resolution works OK. The /etc/hosts.equiv file is empty and the users .rhosts file contains + (plus) so access for that user should be granted from anywhere...

The only weird thing is that if i just do remsh hostname i get a successful login message like this...

Last successful login for user: Tue Feb 13 15:30:22 GMT0BST 2007 on pts/7
Last unsuccessful login for user: Mon Feb 12 13:11:25 GMT0BST 2007

However, when I add date or even /usr/bin/date, I get nothing. What I am actually trying to do though is rcp from the localhost to itself. When I try to do this I get the following...

rcp -p /myfile1 hostname:/data/
rcp: lost connection

Now the only thing I can imagine, is that this is because the host has two lan interfaces, but I'm not sure how this could be affecting this.
Tim Nelson
Honored Contributor

Re: Can remsh localhost, but not to hostname...

Multi-homed host will effect any remote authentication.

rlogin to server and enter password. Then do a who -R to identify what host/IP you are coming from.

If you come in the front door and authentication happens out the back door it will not work.