centOS rsh rcp 配置

1、安装
yum -y install rsh
yum -y install rsh-server
yum -y install xinetd

2、修改hosts,将双方ip和hostname对应

3、在双方根目录下创建.rhosts文件,内容为
hostname root

4、创建/etc/rsh 和/etc/rlogin文件,内容为
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
{
disable = no
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
}
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
{
disable = no
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rlogind
}

5、在/etc/securetty中添加rexec、rsh、rlogin三行

6、重启xinetd
service xinetd restart

7、连接测试
rsh hostname

8、传送文件
rcp file hostname:/home/file1

你可能感兴趣的:(centOS rsh rcp 配置)