|
[root@rhel52 /]# rpm -qa | grep telnet |
|
[root@rhel52 work]# rpm -ivh telnet-server-0.17-38.el5.i386.rpm |
|
[root@rhel52 /]# chkconfig --list | grep telnet |
|
[root@rhel52 /]# chkconfig telnet on |
|
[root@rhel52 /]# chkconfig --level 35 telnet on |
|
[root@rhel52 /]# vim /etc/xinetd.d/telnet # default: on # description: The telnet server serves telnet sessions; it uses \ # unencrypted username/password pairs for authentication. service telnet { disable = no 《=确认是no flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/in.telnetd log_on_failure += USERID } |
|
[root@rhel52 /]# vim /etc/pam.d/login #%PAM-1.0 #auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so auth include system-auth account required pam_nologin.so account include system-auth password include system-auth # pam_selinux.so close should be the first session rule session required pam_selinux.so close session include system-auth session required pam_loginuid.so session optional pam_console.so # pam_selinux.so open should only be followed by sessions to be executed in the user context session required pam_selinux.so open session optional pam_keyinit.so force revoke |
|
[root@rhel52 /]# vim /etc/securetty |
|
[root@rhel52 /]# service xinetd restart |
|
Microsoft Windows [版本 6.1.7100] C:\>telnet 192.168.238.220 正在连接192.168.238.220... Red Hat Enterprise Linux Server release 5 (Tikanga) Kernel 2.6.18-8.el5 on an i686 login: root Password: Last login: Sat Aug 1 22:47:15 from 192.168.238.1 [root@rhel52 ~]# |
|
[root@CentOS5 /]#vi /etc/services |
|
[root@rhel52 /]# vim /etc/xinetd.d/telnet access_time = 20:00-24:00
# 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 only_from = 192.168.0.0/16 } #bind = 192.168.0.100 #only_from = 192.168.0.0/24 #no_access = 192.168.0.{80,90} #access_times = 8:00-9:00 20:00-23:00 |
|
[root@rhel52 /]# vim /etc/xinetd.d/krb5-telnet |
|
[root@rhel52 /]# service xinetd restart |
|
[root@rhel52 /]# vim /etc/xinetd.d/ekrb5-telnet |
|
[root@rhel52 /]# vim service xinetd restart |
|
Cannot resolve network address for KDC in requested realm while getting initial credentials |
|
[root@rhel52 /]# vim /etc/xinetd.d/krb5-telnet |
|
Unencrypted connection refused. Goodbye. |
|
[root@rhel52 /]# vim /etc/xinetd.d/ekrb5-telnet # default: off
# description: The kerberized telnet server accepts only telnet sessions, \ # which use Kerberos 5 authentication and encryption. service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/kerberos/sbin/telnetd server_args = -e log_on_failure += USERID disable = no <- no改成yes } |
|
getnameinfo: localhost: Success |
|
[root@rhel52 /]# vim /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost rhel52 #::1 rhel52 localhost6 192.168.238.220 rhel52 192.168.0.100 win-gk18e84nu08 |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24435147/viewspace-687707/ ,如需转载,请注明出处,否则将追究法律责任。