1825524 Members
1974 Online
109681 Solutions
New Discussion юеВ

remote sh

 
SOLVED
Go to solution
Bawitdaba
Frequent Advisor

remote sh

Hi everyone!!

i've got a question. To get remote sh with remsh i need to have the same users in the local system than in the remote one.I mean if i have twenty users in the local system executing remote shells, i need to get the same twenty users in the remote system.

are there any command to execute remote sh without having to configure the same users as the local system has???

thanks and regards
Merce
5 REPLIES 5
John Poff
Honored Contributor
Solution

Re: remote sh

Hi,

I don't know of a way to configure the remsh machinery without having the users accounts on both machines. The reason is that if someone doesn't have an account on the box, why do they need to execute any remote commands on it? It is a security issue. If they really need the remsh access you can setup the user accounts with the same UIDs on both boxes. As long as you keep track of your user accounts it isn't too hard to keep up with.

JP
A. Clay Stephenson
Acclaimed Contributor

Re: remote sh

The elegant way to solve this is to implement NIS (or NIS+) so that user accounts are maintained in one place. The user must be defined on the remote server although you could remsh -l user and use a common user for these tasks but my approach would be a centralized user management via NIS (or NIS+).
If it ain't broke, I can fix that.
Stefan Farrelly
Honored Contributor

Re: remote sh

remsh takes the -l userid option so you can remsh to different servers using different accounts. We do it all the time. As long as .rhosts is setup to allow the account on the box you are remsh'ing from to login without a password then you dont have to have the same logins setup on all servers.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Ravi_8
Honored Contributor

Re: remote sh

Hi,

There is no command.
or else you can have a common userid for all 20 users, common id existing on both machines
never give up
F. X. de Montgolfier
Valued Contributor

Re: remote sh

Hi,

from remsh manpage:
http://docs.hp.com/cgi-bin/onlinedocs.py?mpn=B2355-90680&service=hpux&path=../B2355-90680/00/01/173&title=HP-UX%20Reference%20Volume%201%3A%20Section%201

[...]
SYNOPSIS

remsh host [-l username] [-n] command host [-l username] [-n] command
[...]

[...]
The remote account name used is the same as your local account name, unless you specify a different remote name with the -l option. This remote account name must be equivalent to the originating account; no provision is made for specifying a password with a command. For more details about equivalent hosts and how to specify them, see hosts.equiv(4) . The files inspected by remshd on the remote host are /etc/hosts.equiv and $HOME/.rhosts (see remshd(1M) ).
[...]

so if you have your .rhost on the remote system configured for access from the local system, typing

remsh remote_host -l remote_user command

will execute command on the remote host using the remote user...

Cheers,

FiX