实现RSH互通

1、检查有无安装rsh-server包

[root@slave1 network-scripts]# chkconfig --list| greprsh

2、 安装rsh 和rsh-server包

[root@slave1 network-scripts]# yum install rsh

..............................

Complete!

[root@slave1 network-scripts]# yum install rsh-server   

.............................                                      

 Complete!


3、修改或者添加cd /etc/xinetd.d/目录下的rlogin,将disable=yes改为disable= no

[root@slave1 xinetd.d]# vi /etc/xinetd.d/rlogin

# default: on

# description: rlogind is the server for the rlogin(1)program.  The server \

#       providesa 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、同样修改或者添加cd /etc/xinetd.d/目录下的rsh,将disable=yes改为disable= no

[root@slave1 xinetd.d]# vi /etc/xinetd.d/rsh

# default: on

# description: The rshd server is the server for thercmd(3) routine and, \

#      consequently, for the rsh(1) program. The server provides \

#       remoteexecution 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、修改 /etc/securetty 添加

rexec

rsh

rlogin

 

[root@slave1 ~]# vi /etc/securetty

console

vc/1

vc/2

vc/3

vc/4

vc/5

vc/6

vc/7

vc/8

vc/9

vc/10

vc/11

tty1

tty2

tty3

tty4

tty5

tty6

tty7

tty8

tty9

tty10

tty11

rexec

rsh

rlogin

6、需要root的rsh需要添加

[root@slave1 etc]# vi /root/.rhosts

pc1

master

slaver1

需要先安装tftp-serve和xinetd

1)首先,检查服务器已安装的tftp-server
        使用命令:rpm -qa | grep tftp-server
        如果存在已安装的tftp这里会列出来

    2)安装tftp-server 和 xinetd
        使用如下的命令,进行相应服务的安装:
        $yum -y install tftp-server
        $yum -y install xinetd

    3)修改tftp配置文件
    使用如下命令:
        $vi /etc/xinetd.d/tft打开配置文件
        service tftp
        {
           socket_type        = dgram
            protocol       = udp
            wait           = yes
            user           = root
            server       = /usr/sbin/in.tftpd
           server_args        = -s /var/lib/tftpboot
            disable       = no //需要修改的地方,初始时刻为yes
            per_source       = 11
            cps           = 100 2
            flags           = IPv4
        }

    4)重起服务
        使用如下命令进行服务的重新启动
        $/bin/systemctl restart xinetd.service
        如果没有效果,使用如下命令
        $/bin/systemctl enable xinetd.service //开启服务
        $/bin/systemctl startxinetd.service  //启动服务


7、重启服务

[root@slave1 xinetd.d]# service xinetd restart

Stopping xinetd:                                          [  OK  ]

Starting xinetd:                                          [  OK  ]

8、添加信任主机

[root@slave1 etc]# vi /etc/hosts.equiv

pc1

master

slaver1

8、需要root的rsh需要添加

[root@slave1 etc]# vi /root/.rhosts

pc1

master

slaver1


9、2台机器互相登陆和自己登

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值