1847047 Members
4962 Online
110261 Solutions
New Discussion

about rlogin

 
SOLVED
Go to solution
peterchu
Super Advisor

about rlogin

I have two hosts - host A and host B
one of user ( eg. userA ) in host A can rlogin to host B ( as I have modiied the ~userA/.rhosts file to let the this user to access ) , now I want all the users can rlogin to host B , except modify all .rhosts under each user directory , what can I do ? thx.
12 REPLIES 12
Pete Randall
Outstanding Contributor

Re: about rlogin

You need to set up the /etc/hosts.equiv file.


Pete

Pete
Simon Hargrave
Honored Contributor

Re: about rlogin

/etc/hosts.equiv is the "global" equivelant of ~/.rhosts. If you create this file it will apply for all users except root.

Remember though that it is generally better to use ssh now, rather than the insecure "r" commands.
peterchu
Super Advisor

Re: about rlogin

thx reply , i tried it , it is OK , but it ask for password , how to set it , not ask password ? thx.
peterchu
Super Advisor

Re: about rlogin

thx simon , about the ssh , I am not too understand of it , I just use the the "r" function in the internal system , do you think ssh is better "r" , we mainly use telnet in our internal system , does ssh can replace telnet and "r" function , if I only replace the "r" with ssh , is it possible ? thx
Simon Hargrave
Honored Contributor

Re: about rlogin

ssh is more secure than the "r" commands and telnet, ftp etc. It is generally being adopted in most companies over the older insecure counterparts. The old ones still work, however they make it very easy for someone to hack into your systems. It is a good idea where possible therefore to adopt ssh over the others.

If you haven't come across SSH before, you can read up on it here: -

http://www.openssh.org/

And you can download it for free for HPUX here: -

http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA
Pete Randall
Outstanding Contributor

Re: about rlogin

You need to set up a /etc/hosts.equiv file on HostB that contains a line with "HostA" in it. I also do the reverse (file on HostA with "HostB" in it), but that's up to you.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: about rlogin

You only really need to worry about the exposure risk of the "r" commands if your machine is exposed to the web. If you're safely tucked away behind a firewall, there's no need to worry about SSH.


Pete

Pete
Muthukumar_5
Honored Contributor

Re: about rlogin

We are having the unique rhosts files over /etc/hosts.equiv file to control all users except root user

For root user change as,

/.rhosts
hostA +

Or to allow root users to access root then,
hostsA root

And on /etc/hosts.equiv file as,

hostA +


Where + will give the access to all users from hostA machine.

It is used to allow all users. And change the permission to them to 400 so that it can not be modified.

Regards
Muthu




Easy to suggest when don't know about the problem!
peterchu
Super Advisor

Re: about rlogin

thx all reply , but the hostB ask the password , how to set it to allow all remote users from host A are no need password to access host B ? thx
Pete Randall
Outstanding Contributor

Re: about rlogin

You need to set up a /etc/hosts.equiv file on HostB that contains a line with "HostA" in it. I also do the reverse (file on HostA with "HostB" in it), but that's up to you.


Pete

Pete
Muthukumar_5
Honored Contributor

Re: about rlogin

Let's explain you more.


hostsA --> hostB

login into hostB machine as root

vi /.rhosts
hostA +

chmod 400 /.rhosts

vi /etc/hosts.equiv
hostA +

chmod 400 /etc/hosts.equiv

Then login into hostA on another termainal then,

rlogin hostB -l

example:

rlogin hostB -l root
rlogin hostB -l testusr

root --> will use /.rhosts file
testusr --> will use /etc/hosts.equiv file

It will not ask password.

In the old setup you did not give access to root. If you try on root it will ask passwd. So you have to set /.rhosts too.

And All experts shared knowledge and spent time for you. Reward by assigning points :)

Regards
Muthu
Easy to suggest when don't know about the problem!
Pete Randall
Outstanding Contributor
Solution

Re: about rlogin

From the man page:

"EXAMPLES
1. /etc/hosts.equiv on hostA contains the line:

hostB

and /etc/hosts.equiv on hostB is empty. User chm on hostB can use remsh to hostA, or rlogin to account chm on hostA without being prompted for a password. chm will, however, be prompted for a password with rlogin, or denied access with remsh, from hostA to hostB."


Pete



Pete