CentOS6 install and configure rsh and centos6rsh

Source: Internet
Author: User

CentOS6 install and configure rsh and centos6rsh

Basic information:
Node 1:
Ip: 192.168.8.166
Host Name: hadrtest01
Node 2:
Ip: 192.168.8.250
Host Name: hadrtest02

1. Install the rsh and rsh-server packages respectively.

yum -y install rsh rsh-server

2. Modify/etc/xinetd. d/rlogin to ensure that the row is disable = no.

# 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
}

Modify Node 2 as needed

3. Modify/etc/xinetd. d/rsh to ensure that the line is disable = no.

[Root @ hadrtest01 ~] # Cat/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
}

Modify Node 2 as needed

4. edit/etc/securetty and add three lines: rexec, rsh, and rlogin.

echo "rexec rsh rlogin" >> /etc/securetty

5. edit/etc/hosts and add the ip address and Host Name of the two nodes.

[root@hadrtest01 ~]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.8.166 hadrtest01192.168.8.250 hadrtest02

Modify Node 2 as needed

6. Modify ~ /. Rhosts, add Node 1, node 2 host name, ip address

[root@hadrtest01 ~]# cat ~/.rhosts hadrtest01 roothadrtest02 root[root@hadrtest02 ~]# cat ~/.rhostshadrtest01 roothadrtest02 root

7. Start the service at two nodes
Restart:

service xinetd restart

Start startup:

chkconfig xinetd on

8. Test
Node 1:

[root@hadrtest01 ~]# rsh hadrtest02Last login: Tue Feb 16 17:44:56 from hadrtest01[root@hadrtest02 ~]# 

If you do not enter a password to log on to node 2, the installation is successful.

Node 2:

[root@hadrtest02 ~]# rsh hadrtest01Last login: Tue Feb 16 17:39:35 from hadrtest02[root@hadrtest01 ~]# 

If you do not enter a password to log on to node 1, the installation is successful.

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.