What is the difference between "/etc/hosts.equiv" AND ".rhosts" ?
Hi Friends,
I am preparing for SUN certification. In my text book in review section there is a question, Q)Which of the following files gives a specified user permission to log in remotely from the specified host without having to supply a password? a) .rhosts b) /etc/hosts.equiv c) /etc/default/login d)/etc/hosts 1) Answer is shown as option 'a' , But 'b' is also correct? 2) these 2 files are using for same purpose ? Kindly advice reg Arun(INDIA) |
/etc/hosts.equiv is system-wide and applies to everyone, while .rhosts is specific to the user (and is stored in their home directory)
|
Thanks for your response,,
So the Correct answer is only (a) ? reg Arun |
Yes -- since it says "specified user" -- the answer is (a).
|
Thanks now it is very clear for me.
One More Doubt. So A user can give access to others by doing appropriate changes in ".rhosts" file with out the permission of Administrator ? reg ARUN |
google = your friend
|
Kcarun:
.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 echo server2 paul >> /export/home/john/.rhosts Well, you get the idea (I hope) |
Thank you friends for your response..
I am a newbie in Solaris, I searched for the two files "/etc/hosts.equiv " and "/.rhosts" But it is not there. At the time of Installation (Solaris Express) I choose "CORE " Option. SO in core option these files will not be available OR Networking is not possible? reg Arun |
Quote:
As a side note, using .rhosts is a security risk, so it's use is not recommended, use something more secure like ssh. Regards, |
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. |
Thaks for solving my queries !!!!
Hi Friends , thaks to all , For last few days ,I was not able to check the responses due to unavailability of net access .
Anyway I decided to reinstall my OS , I need all your helps in future. Thanking once again reg Arun_India |
Hi all,
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? Thanks, Deepak |
One more thing,
When I edit both files, should I use rlogin to access the machine from trusted hosts? |
Quote:
|
Use ssh by generating keys with ssh-keygen
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 ":"). good luck |
All times are GMT -5. The time now is 02:18 AM. |