[comp.unix.questions] rsh command

cherman@cmvax.umiacs.umd.edu (Charles Herman) (02/14/91)

	When I try to do an rsh to issue a command to a remote host I get a
"Permission denied" response.  The method I used is the following.  I created
a .rhosts file in the remote machine's home directory containing 

<local host name> <local login name>

(<local host name> refers to the machine from which I issue the rsh).

From the local host I type

rsh <remote host name> -l <remote login name> <command>.

	What am I doing wrong???

					Charles Herman
					herman@cmvax.umiacs.umd.edu

subbarao@phoenix.Princeton.EDU (Kartik Subbarao) (02/14/91)

In article <26006@adm.brl.mil> cherman@cmvax.umiacs.umd.edu (Charles Herman) writes:
>
>	When I try to do an rsh to issue a command to a remote host I get a
>"Permission denied" response.  The method I used is the following.  I created
>a .rhosts file in the remote machine's home directory containing 
>
><local host name> <local login name>
>
>(<local host name> refers to the machine from which I issue the rsh).
>
>From the local host I type
>
>rsh <remote host name> -l <remote login name> <command>.
>

Sometimes you need FQDNs. Try putting:

localhostname.localhostdomainname localloginname

into your .rhosts and retry.

Also - is the remote host in your hosts table (can it be found?)

			-Kartik
--
internet# find . -name core -exec cat {} \; |& tee /dev/tty*
subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet
kartik@silvertone.Princeton.EDU (NeXT mail)       -|	
SUBBARAO@PUCC.BITNET			          - Bitnet

jik@athena.mit.edu (Jonathan I. Kamens) (02/15/91)

In article <26006@adm.brl.mil>, cherman@cmvax.umiacs.umd.edu (Charles Herman) writes:
|> [problems getting .rhosts to work]

  Someone else has already pointed out that you should try various
permutations of your hostname in the .rhosts file.

  The other thing you should make sure of is that the .rhosts file is owned by
you *and* does not have read or write permission set for group or world (so
you should probably chmod it to 600).  Many versions of rlogin, rsh, etc.
check for group/world read/write permission and won't use the .rhosts file if
any of them are enabled.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik@Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710

dik@cwi.nl (Dik T. Winter) (02/15/91)

In article <6264@idunno.Princeton.EDU> subbarao@phoenix.Princeton.EDU (Kartik Subbarao) writes:
 > Sometimes you need FQDNs. Try putting:
 > localhostname.localhostdomainname localloginname
 > into your .rhosts and retry.
 > 
 > Also - is the remote host in your hosts table (can it be found?)
Yes, sometimes you need the numeric representation.  A good way to find out
what you must put in your .rhosts file is to do a rlogin to the system and
look where the system thinks you are logged in from (if your system has
last that will give you the answer).  Note that on many systems presence in
or absence from an host file or a yp hosts database does not imply that the
system is able/unable to determine what name corresponds to the IP number.

(From one of my .rhosts files:
paring.cwi.nl dik
192.16.184.253 dik
these are synonyms.  They are both needed because at some times the service
that translates IP numbers to hostnames is not available.)
--
dik t. winter, cwi, amsterdam, nederland
dik@cwi.nl