1、当然这个文档比较适合初学者,比如我。同时此文档仅能抛砖引玉,对于其他的linux系统如Ubuntu等还是有一些区别。各位在使用中加以考量,鄙人在逐渐学习linux的过程中,不断的体会到每个文件与系统的整合,思考他们运作的方式。一直在寻找这样一本能够直观的如神经脉络一样谱写出linxu系统的书籍。不断寻找中,理解才是永恒。-telnet:提供telnet服务,使用未加密的用户/密码组进行验证,依附于xinetd服务。文件位于/etc/xinetd.d/telnet。krb5-telnet:提供telnet服务,允许普通的telnet登陆,默认是不允许root用户登录,使用kerberos5验证
2、,依附于xinetd服务。文件位于/etc/xinetd.d/krb5-telnet。ekrb5-telnet:提供加密的telnet服务,但是必须要ekrb5的加密服务器。文件位于/etc/xinetd.d/ekrb5-telnet。xinetd:因特网操作服务程序。提供类似于inetd+tcp_wrapper的功能,但是更加强大和安全,监控网络对各种它管理的服务的需求,并在要的时候启动相应的服务程序。文件位于/etc/xinetd.d中1、查看telnet rpm包rootrhel52 /# rpm -qa | grep telnettelnet-0.17-38.el5 telnet-se
3、rver-0.17-38.el5 =RHEL5CD#4rootrhel52 /# 2、安装telnet server rpm包rootrhel52 work# rpm -ivh telnet-server-0.17-38.el5.i386.rpmwarning: telnet-server-0.17-38.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186Preparing. # 100% package telnet-server-0.17-38.el5 is already installedrootrhel52 wo
4、rk# 注:安装完毕以后会在/etc/xinetd.d/中出现一个telnet配置文件1、查看telnet服务rootrhel52 /# chkconfig -list | grep telnet ekrb5-telnet: off krb5-telnet: telnet:rootrhel52 /#2、开启telnet服务rootrhel52 /# chkconfig telnet on也可以用rootrhel52 /# ntsysv开启3、设置自动启动rootrhel52 /# chkconfig -level 35 telnet on on1、配置telnet文件rootrhel52 /#
5、 vim /etc/xinetd.d/telnet# default:# 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 += USE
6、RID2、注意/etc/xinetd.d/ekrb5-telnet 和 krb5-telnet两个文件中的disable,稍后说明其作用。1、确认/etc/pam.d/login中的pam_securetty.so行,并将其注释掉#rootrhel52 /# vim /etc/pam.d/login#%PAM-1.0#auth user_unknown=ignore success=ok ignore=ignore default=bad pam_securetty.soauth include system-authaccount required pam_nologin.soaccount
7、 include system-authpassword include system-auth# pam_selinux.so close should be the first session rulesession required pam_selinux.so closesession include system-authsession required pam_loginuid.sosession optional pam_console.so# pam_selinux.so open should only be followed by sessions to be execut
8、ed in theuser contextsession required pam_selinux.so opensession optional pam_keyinit.so force revoke2、开通telnet控制台,在/etc/securetty文件中设定rootrhel52 /# vim /etc/securettyconsolevc/1vc/2vc/3tty1tty2tty3tty4tty5.pts/1pts/2pts/3pts/4pts/5在文件后面追加pts/1.pts/n因为telnet服务是由xinetd调用,所以只要重新启动xinetd即可rootrhel52 /#
9、 service xinetd restartStopping xinetd: OK Starting xinetd:Microsoft Windows 版本 6.1.7100版权所有 (c) 2009 Microsoft Corporation。保留所有权利。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 i686login: rootPassword:Last login: Sat Aug 1 22
10、:47:15 from 192.168.238.1rootrhel52 #设定配置文件/etc/servicesrootCentOS5 /#vi /etc/services找到下面的两行:telnet 23/tcptelnet 23/udp设定配置文件/etc/xinetd.d/telnet access_time = 20:00-24:00 disable = no 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_time
11、s = 8:00-9:00 20:00-23:文件所在位置 /etc/xinetd.d/krb5-telnet其实rhel5已经装了krb5-telnet,那么就可以启用这个服务来达到开启telnet的目的。不用再安装telnet-server这个软件包了。可以使用Kerberos 5来进行认证。1、开启krb5-telnet服务。rootrhel52 /# vim /etc/xinetd.d/krb5-telnet将“disable = yes” 改为“disable = no”2、启动服务文件所在位置 /etc/xinetd.d/ekrb5-telnetekrb5- telnet可以用来提供加密的telnet服务。如果启用了ekrb5-telnet服务,但是又没有Kerberos服务器的话,那么在进行 telnet登录时,总是会报“Unencrypted connection refused. Goodbye.(未加密的连接,拒绝服务)”这个错误。1、开启ekrb5-telnet服务。rootrhel52 /# vim /etc/xinetd.d/ekrb5-telnet将“disable = ye
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1