1851012 Members
2944 Online
104056 Solutions
New Discussion

remsh

 
SOLVED
Go to solution
Manikantan IB
Occasional Contributor

remsh

Hi

It might be a silly question to ask...but still... being a toddler in HP-UX...i think i can ask :-)

My question is ... What is the prerequisite for remsh to work?

Thanks in advance !
4 REPLIES 4
Dan Hetzel
Honored Contributor

Re: remsh

Hi,

For remsh to work from hosta to hostb you need:

on hosta:
nslookup hostb working
on hostb:
nslookup hosta working
.rhosts file in user's home directory contining one line with 'hosta'

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
John Bolene
Honored Contributor

Re: remsh

Putting in the short name for the host did not work for us in this case. We had to put in the long DNS fully qualified name. Doing a who -a on the remote machine will tell you the DNS name to add to the .rhosts file. This name can be different for a machine with more than one LAN card and corresponding IP. You may be coming in one DNS name and not another.

John
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
James R. Ferguson
Acclaimed Contributor
Solution

Re: remsh

Hi:

In order for 'remsh' to work, you must have the 'shell' port defined in /etc/services, and the following line in /etc/inetd.conf :

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

To enable 'rexec', define the 'exec' service in /etc/services and the following in /etc/inetd.conf :

exec stream tcp nowait root /usr/lbin/rexecd rexecd

'rexec' works the same as 'remsh', except that 'rexec' prompts for a password before executing the command instead of querying the hosts.equiv for authentication.

Thus, 'rexec' can be substituted for 'remsh' in situations were there are no hostequiv(alent) files.

In order to use 'rcp', however, you must have hosteqivalent files setup. 'rcp' uses the 'remshd' server.

See the man pages for 'remshd (1M)', 'rexecd (1M)', and 'hosts.equiv (4).

...JRF...
Shannon Petry
Honored Contributor

Re: remsh

I have to add the "hostequiv(alent)" file that was mentioned, but not defined.

There can be two types of files for ident checking.
1. $HOME/.rhosts

2. /etc/hosts.equiv

both are identical in the respect that it is a file, containing single host entries granting access to "rsh", "rexec", etc... to that host. For users sake, I maintain an "/etc/hosts.equiv" file, and have a script removing "$HOME/.rhosts". This allows me to control who is allowed to access which host and from where they can access.

NOTE: /etc/hosts.equiv DOES NOT WORK for root( I believe that all UID's under 10 are restricted to $HOME/.rhosts) Correct me if I am wrong on that one please!

Permissions on an /etc/hosts.equiv file should be 444 (read, read, read). Permissions on a $HOME/.rhosts file should be 400 (read, none, none).

Permissions are not required, but are good to have set!

Regards,
Shannon
Microsoft. When do you want a virus today?