/etc/hosts.equiv verses $HOME/.rhosts

Bill Wyatt,OIR wyatt at cfa.HARVARD.EDU
Wed Sep 5 00:32:25 AEST 1990


>>[...]  Could some kind sole tell me why using $HOME/.rhosts 
>>is unsafe and why /etc/hosts.equiv is safe?  

> [...]  I wouldn't use hosts.equiv for any reason and rhost should
> only be readable by you.  To increase security you may want to have
> the rhost in place only when you are doing work.

Yes! We use crontab and find(1) once a day on our systems to remove
ALL .rhosts files. The users may reconstitute their .rhosts files each
day, of course, but are encouraged to put a `rm ~/.rhosts' into a
.logout file as well. 

Since I use X on several machines at once, I have a script run at
login time to rlogin to those few machines I always use. My .login on
those remote machines copies a files into .rhosts. I also have a `log'
command aliased to set an environment variable before logging out so I
can log out but not have the .logout script kill the .rhosts file. 

My local .xsession script can then open windows up on the various
machines with no problem. When I logout of my own machine, there's yet
another script run from .logout that attempts to rsh to each machine
in the .rhosts file to removes its copy of .rhosts, and then removes
the local .rhosts.

If this sounds complicated, it really isn't. It requires some initial 
configuration setup, and a couple extra minutes when logging in, is all. 
It's much more secure having .rhosts available all over the place all the
time.

Bill Wyatt, Smithsonian Astrophysical Observatory  (Cambridge, MA, USA)
    UUCP :  {husc6,cmcl2,mit-eddie}!harvard!cfa!wyatt
 Internet:   wyatt at cfa.harvard.edu
     SPAN:   cfa::wyatt                 BITNET: wyatt at cfa



More information about the Comp.unix.wizards mailing list