The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-02-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
why

This has puzzling me for a while. I hope someone can help me understand this:
Once we log in to one of our unix servers, we can log in to other unix servers by just typing the host name. Without providing a password.
I have always curious how they were set up this way and found out that admin made a sybolic link(I think this is how they made it):

ln -s /usr/bin/rsh /usr/bin/hostname1

My question is why can people just type hostname1 and get to login to other host server?

What's going on?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-02-2004
zazzybob's Avatar
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
From the "rsh" manual page
Quote:
If the name of the file from which rsh is executed is any-
thing other than rsh, rsh takes this name as its hostname
argument. This allows you to create a symbolic link to rsh
in the name of a host which, when executed, will invoke a
remote shell on that host. By creating a directory and
populating it with symbolic links in the names of commonly
used hosts, then including the directory in your shell's
search path, you can run rsh by typing hostname to your
shell.
Cheers
ZB
Reply With Quote
  #3 (permalink)  
Old 12-02-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
Talking Thanks!!!

Reply With Quote
  #4 (permalink)  
Old 12-02-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
New problem

I have three linux servers all set up the same way( I think) but one of the servers can't use hostname as rsh sybolic link.
I `ln -s /usr/bin/rsh /usr/bin/hostname1` on this hostname1 server.
But when I typied hostname1 from hostname2, I got this:
....
Connection refused
...

But I can do this from hostname2 with no problem: `rsh hostname1 ls`
It will give me the list of that directory.


I can do it from hostname1 to hostname2--one way.

Why?
Reply With Quote
  #5 (permalink)  
Old 12-02-2004
TioTony's Avatar
Bit Pusher
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
On hostname1 check the .rhosts file in the home directory of the user you are running 'hostname1' as from hostname2.
Reply With Quote
  #6 (permalink)  
Old 12-03-2004
whatisthis's Avatar
Registered User
 

Join Date: Aug 2004
Posts: 175
.rhosts

They are all set up the same way in .rhosts file:
hostname1 username1
hostaname2 username2


Basically I can't run rlogin on one of the linux to the other machine.
Is there anything I should look related to rlogin?

Last edited by whatisthis; 12-03-2004 at 06:53 AM.
Reply With Quote
Google UNIX.COM
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0