How to turn on rsh and rlogin on RedHat Enterprise Linux (RHEL 2.1/ 3.0)

Enable them:

Turn on these three using chkconfig on both the nodes: rexec, rsh and rlogin.


# chkconfig rexec on
# chkconfig rsh on
# chkconfig rlogin on


xinetd

Restart xinetd to be sure.

# service xinetd restart


.rhosts

On hostA's root home directory (usually /root), create a .rhosts file, which has hostB in it.


# cat .rhosts
hostB


Similarly, create a .rhosts on hostB's root home directory which has hostA in it.

# cat .rhosts
hostA


hosts.allow


Now, edit /etc/hosts.allow on hostA:


#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
ALL : hostB


Edit /etc/hosts.allow on hostB:

#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
ALL : hostA


hosts.equiv

Edit /etc/hosts.equiv on hostA to have


# cat /etc/hosts.equiv
hostB



Edit /etc/hosts.equiv on hostB to have


# cat /etc/hosts.equiv
hostA

/etc/securetty

And finally, knock off /etc/securetty (rename it or worse, purge it) on both hostA and hostB

Now you are good to go.

Disclaimer: Use at your own risk. Don't flame me. It sure worked for me. Actual results may vary. Use ssh in place of rlogin/rsh/telnet and the like, as ssh is more secure.

comment 0 comments:

Popular Posts

Linux Gazette