Operating System - HP-UX
1832856 Members
3000 Online
110047 Solutions
New Discussion

remsh is not working properly ( Its working one way)

 

remsh is not working properly ( Its working one way)

Hi,
From Server A I cant remsh into Server B, while it is possible from Server B to Server A.
Sametime from Server A I can remsh into Server C and vice versa.

I checked following
1) hosts.equiv does not exist any of the server
2) hosts file entry is proper in all the server
3) I had checked all the forums related to the same in itrc and tried my best but no RESULT.

So can anyone help me on this?
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: remsh is not working properly ( Its working one way)

If hosts.equiv does not exist on any server then you are probably using a .rhosts file in your home directory.

Look on all servers in your home directory for a .rhosts file.

Do a 'man rhosts' for more information on the file and how to set it up.

Re: remsh is not working properly ( Its working one way)

Yes
I am using the .rhosts file. There is a file exist on the home directory on each server. I checked it and verified.
Then Man .rhosts......... :-)
Tim Nelson
Honored Contributor

Re: remsh is not working properly ( Its working one way)

WHen you say you can't from A to B what error are you getting ?

Does serverB have remshd configured ?

remsh is completely dependant on the config of the destination.

If A to B does not work then the issue is on B.

Many things need to happen on B.
1) remsh needs to be configured in inetd.conf
2) if inetd.sec is being used then remsh needs to be allowed from A and others.
3) .rhost file on B must be configured properly. If using hostnames then /etc/hosts must be configured correctly for ServerA.
4) If there is a firewall between serverA and serverB then the firewall needs to be configured correctly.

Many of these possible issues can be elimited if you post the error instead of it don't work.

Re: remsh is not working properly ( Its working one way)

Hi,
I am not getting any error mesaage. its asking for the password. Ideally it should not ask for it as both servers have the same password for this particular user.

1) remsh is configured in inetd.conf. Adding to this point From Server B I can remsh into some other servers.
2) inetd.sec is not used any of the servers.
3) .rhost file is configured properly. even i tried copy the file for another user( which is working for another server) and edited. still no luck
4) Firewall is OK

Thanks for the detailed suggestion. please advise me further
Patrick Wallek
Honored Contributor

Re: remsh is not working properly ( Its working one way)

What are the permissions on the .rhosts file on the server that is not working? The permissions should be 600 (-rw-------).

Re: remsh is not working properly ( Its working one way)

-rw-r--r-- 1 user group .rhosts

This is the permission on all servers
Tim Nelson
Honored Contributor

Re: remsh is not working properly ( Its working one way)

Alright, so if it asking for a password then the issue lies in the .rhosts file on serverB.

Try a telnet from A to B. Then while logged into B do a "who -R" and look to see how B is resolving your session from A. If it comes back with an IP and you have a hostname in B's .rhosts file then you need to fix the /etc/hosts entry for A.

Also an nslookup from B for A will help to see if there is a mis-match. The lookup and the .rhosts file need to be the same. Try a + sign in the .rhosts file just to test.

I typically see this issue with multi-homed host where the connection intiates on lan1 from A to B but resolves on B to lan2.

Bill Hassell
Honored Contributor

Re: remsh is not working properly ( Its working one way)

> -rw-r--r-- 1 user group .rhosts

Bad permissions. .rhosts *must* be 600 or 400. You do not want anyone looking at the contents of these files. The fact that some systems work and others do not (with the same permissions) is likely due to OS version and patch differences.

The other issue is name resolution. /etc/hosts is only meaningful when your nsswitch.conf file points to it first (which is not the default). Change .rhosts to use the IP address as well as the simple and fully-qualified name:

$ cat .rhosts
12.34.56.78 billh
mycpu billh
mycpu.domain.com billh

One of these will work depending on how hostnam resolution is setup.


Bill Hassell, sysadmin