why


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users why
# 1  
Old 12-02-2004
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?
# 2  
Old 12-02-2004
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
# 3  
Old 12-02-2004
Computer Thanks!!!

Smilie
# 4  
Old 12-02-2004
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?
# 5  
Old 12-03-2004
On hostname1 check the .rhosts file in the home directory of the user you are running 'hostname1' as from hostname2.
# 6  
Old 12-03-2004
.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 10:53 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question