Red Hat Enterprise Linuxにrcpのためのサーバ(rshサーバ)を稼働させてみる。
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
# getenforce
Disabled
# chkconfig --list rsh
rsh off
# chkconfig rsh on
# chkconfig --list rsh
rsh on
# ls -l /root/.rhosts
ls: cannot access /root/.rhosts: No such file or directory
# vi /root/.rhosts
# chmod go-rwx /root/.rhosts
# ls -l /root/.rhosts
-rw------- 1 root root 454 Jun 22 11:20 /root/.rhosts
# vi /etc/securetty
# ls -l /etc/securetty
-rw------- 1 root root 126 Jun 22 11:21 /etc/securetty
# tail -n1 /etc/securetty
rsh
# service xinetd restart
# cp -p /root/.rhosts ~alice/
# chown alice:alice ~alice/.rhosts
# hostname
lemming
xinetdを動かしたサーバlemmingに、試しにファイルdataをrcpしてみる。
$ which rcp
/usr/bin/rcp
$ rcp -p data lemming:./