Implement rlogin password-less intercommunication between two nodes in linux

Source: Internet
Author: User
In linux, implement rlogin password-less intercommunication between two nodes-Linux Enterprise Application-Linux server application information. The following is a detailed description. By olivenan@hotmail.com

1. Check whether the rsh-server package is installed
[Root @ racnode1 ~] # Rpm-qa rsh-server

2. Install the rsh-server package
[Root @ racnode1 package] # rpm-ivh rsh-server-0.17-25.4.i386.rpm
Warning: rsh-server-0.17-25.4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ######################################## ### [100%]
1: rsh-server ##################################### ###### [100%]
[Root @ racnode1 package] #

3. Modify rlogin in the cd/etc/xinetd. d/directory and change disable = yes to disable = no.
[Root @ racnode1 package] # vi/etc/xinetd. d/rlogin
# Default: on
# Description: rlogind is the server for the rlogin (1) program. The server \
# Provides a remote login facility with authentication based on \
# Privileged port numbers from trusted hosts.
Service login
{
Socket_type = stream
Wait = no
User = root
Log_on_success + = USERID
Log_on_failure + = USERID
Server =/usr/sbin/in. rlogind
Disable = no
}

4. Modify the rsh in the cd/etc/xinetd. d/directory and change disable = yes to disable = no.
[Root @ racnode1 package] # vi/etc/xinetd. d/rsh
# Default: on
# Description: The rshd server is the server for the rcmd (3) routine and ,\
# Consequently, for the rsh (1) program. The server provides \
# Remote execution facilities with authentication based on \
# Privileged port numbers from trusted hosts.
Service shell
{
Socket_type = stream
Wait = no
User = root
Log_on_success + = USERID
Log_on_failure + = USERID
Server =/usr/sbin/in. rshd
Disable = no
}

5. Restart the xinetd service.
[Root @ racnode1 package] # service xinetd restart
Stopping xinetd: [OK]
Starting xinetd: [OK]

6. Restart the xinetd service.
Add rexec, rlogin, and rsh to/etc/securetty
[Root @ racnode1 ~] # Echo "rexec">/etc/securetty
[Root @ racnode1 ~] # Echo "rlogin">/etc/securetty
[Root @ racnode1 ~] # Echo "rsh">/etc/securetty

7. Add/etc/hosts. equiv
Vi/etc/hosts. equiv
Racnode1
Racnode2
Priv1
Priv2
Crs_vip1
Crs_vip2
[Root @ racnode1 package] # vi/etc/hosts
# Do not remove the following line, or various programs
# That require network functionality will fail.
127.0.0.1 racnode1 localhost. localdomain localhost
192.168.6.20.racnode1
192.168.6.252 racnode2
10.1.1.1 priv1
10.1.1.2 priv2
192.168.6.253 crs_vip1
192.168.6.254 crs_vip2
~

8. Add. rhosts
[Root @ racnode1 package] # vi ~ /. Rhosts
Racnode1 root
Racnode2 root
Priv1 root
Priv2 root
~
With the above configuration, you can achieve password-free intercommunication.

9. When using rsh or rlogin to another node, the following message is displayed:
[Root @ racnode1 init. d] # rsh racnode2
Connect to address 192.168.6.252: Connection refused
Trying krb4 rlogin...
Connect to address 192.168.6.252: Connection refused
Trying normal rlogin (/usr/bin/rlogin)
Last login: Mon Apr 21 14:36:32 from racnode1
You have new mail.
[Root @ racnode2 ~] #
[Root @ racnode1 init. d] # rlogin racnode2
Connect to address 192.168.6.252: Connection refused
Trying krb4 rlogin...
Connect to address 192.168.6.252: Connection refused
Trying normal rlogin (/usr/bin/rlogin)
Last login: Mon Apr 21 14:42:17 from racnode1
You have new mail.
[Root @ racnode2 ~] #
View the installation package used by default rlogin
[Root @ racnode1 init. d] # rpm-qf 'which rlogin'
Krb5-workstation-1.3.4-27
[Root @ racnode1 init. d] #
[Root @ racnode2 ~] # Rpm-qf 'which rsh'
Krb5-workstation-1.3.4-27
[Root @ racnode2 ~] #
Solution: 1. Rename the default rlogin and rsh
[Root @ racnode2 ~] # Which rsh
/Usr/kerberos/bin/rsh
[Root @ racnode2 ~] # Mv/usr/kerberos/bin/rsh. original
[Root @ racnode2 ~] # Mv/usr/kerberos/bin/rlogin. original
[Root @ racnode2 ~] # Mv/usr/kerberos/bin/rcp. original
[Root @ racnode2 ~] #
2. Delete package krb5-workstation-1.3.4-27
[Root @ racnode2 ~] # Rpm e krb5-workstation-1.3.4-27
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.