What is the difference between "/etc/hosts.equiv" AND ".rhosts" ?
Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
.rhosts can be edited by either root or a regular user in their own home directories. /etc/hosts.equiv can only be edited for root but it applies to users only.
Examples:
root on server1 wants to allow root on server2 to log into server1 as root
echo server2 >> /.rhosts
root on server1 wants root from anywhere to log in as root from any other machine (really stupid)
echo + >> /.rhosts
root on server1 wants paul to log in as root from server2 (with the -l option)
echo server2 paul >> /.rhosts
root on server1 wants to allow john and paul to log in as themselves (basically any users that exist on both machines but not root) from server2 into server1
echo server2 >> /etc/hosts.equiv
john on server1 wants john to log in as himself from server2
echo server2 >> /export/home/john/.rhosts
john on server1 wants paul to log in as john from server2
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Networking is possible even with the CORE cluster installed.
These two files aren't required for the rlogin service to work so aren't installed by default.
Anyway, they shouldn't be created for security reasons as already stated.
I created both files and input the entries for trusted hosts. But when I try to login from remote system, it keeps asking for password. It only takes root password. How to make remote login possible without inputting password?
Start on your original system (system A).
Run ssh-keygen (note this should be run just once per system).
Just hit enter to all querys.
You now have a directory ~/.ssh that contains a file id_rsa.pub .
Login to the system you want to have the access to (system B).
Run ssh-keygen (if needed)
Copy (suggest scp) the file id_rsa.pub from system A to system B.
If the file ~/.ssh/authorized_keys does not exist, create it using "touch" and set the mode to 600 with "chmod".
Append the contents of id_rsa.pub to ~/.ssh/authorized_keys
You should now be able from system A do a ssh system_B with no pw.
You can now also do an scp from A to B (don't forget the ":").
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.