[loong@localhost ~]$ cat /etc/issue CentOS release 5.8 (Final) Kernel \r on an \m
[loong@localhost ~]$ rpm -qa | grep telnet telnet-0.17-39.el5
[loong@localhost ~]$ rpm -qa | grep telnet telnet-0.17-39.el5 telnet-server-0.17-39.el5
# default: on # description: The telnet server serves telnet sessions; it uses \ # unencrypted username/password pairs for authentication. service telnet { disable = no flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID }
注:方法二和方法三,需要激活xinetd服务。方法如下:
[root@localhost loong]# service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ]
[root@localhost loong]# /etc/rc.d/init.d/xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ]
[root@localhost loong]# telnet localhost Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. CentOS release 5.8 (Final) Kernel 2.6.18-308.1.1.el5 on an i686 login: loong Password: Last login: Tue Apr 24 16:42:06 from 10.108.14.135 [loong@localhost ~]$ exit logout Connection closed by foreign host. [root@localhost loong]#
telnet> o localhost Trying 127.0.0.1... Connected to localhost.localdomain (127.0.0.1). Escape character is '^]'. CentOS release 5.8 (Final) Kernel 2.6.18-308.1.1.el5 on an i686 login: root Password: Login incorrect login: Login incorrect login: Login incorrect login: Connection closed by foreign host. [root@localhost loong]# tail -20 /var/log/secure Apr 24 17:32:58 localhost login: pam_securetty(remote:auth): access denied: tty 'pts/1' is not secure ! Apr 24 17:33:03 localhost login: FAILED LOGIN 1 FROM localhost FOR root, Authentication failure
1 #%PAM-1.0 2 #auth required pam_securetty.so 3 auth include system-auth