如果没有安装rsh-server-0.17-40.el5_7.1.i386.rpm软件包,需要进行安装:
[root@nbu ~]# rpm -ivh rsh-server-0.17-40.el5_7.1.i386.rpm
#######################################################
#######################################################
[root@nbu ~]# chkconfig rsh on
[root@nbu ~]# cat .rhosts
127.0.0.1 root
192.168.0.107 root
[root@nbu ~]# tail /etc/securetty
tty5
tty6
tty7
tty8
tty9
tty10
tty11
rlogin
rsh
rexe
[root@nbu ~]# iptables -F
[root@nbu ~]# cd /etc/xinetd.d/
[root@nbu xinetd.d]# ls
chargen-dgram cvs daytime-stream discard-stream echo-stream ekrb5-telnet klogin kshell rlogin rsh tcpmux-server time-dgram
chargen-stream daytime-dgram discard-dgram echo-dgram eklogin gssftp krb5-telnet rexec rmcp rsync tftp time-stream
[root@nbu xinetd.d]# ls r*
rexec rlogin rmcp rsh rsync
[root@nbu xinetd.d]# vi 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
}
~
~
"rlogin" 14L, 377C written
[root@nbu xinetd.d]# vi rexec
# default: off
# description: Rexecd is the server for the rexec(3) routine. The server \
# provides remote execution facilities with authentication based \
# on user names and passwords.
service exec
disable = no
}
~
~
[root@nbu xinetd.d]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@nbu xinetd.d]# rlogin 192.168.0.107
connect to address 192.168.0.107 port 543: Connection refused
Trying krb4 rlogin...
connect to address 192.168.0.107 port 543: Connection refused
trying normal rlogin (/usr/bin/rlogin)
Last login: Thu May 31 02:40:19 from 192.168.0.101
============================= 登陆成功 ========================
[root@nbu ~]# exit
logout
rlogin: connection closed.
[root@nbu xinetd.d]#
[root@nbu xinetd.d]#
[root@nbu xinetd.d]#
[root@nbu xinetd.d]#
[root@nbu xinetd.d]#
[root@nbu xinetd.d]# exit
logout
阅读(3208) | 评论(0) | 转发(0) |