萬盛學電腦網

 萬盛學電腦網 >> Linux教程 >> 實例解析:在RHEL 5上telnet的開啟過程

實例解析:在RHEL 5上telnet的開啟過程

class="21278">

1、確定你的telnet服務打開沒有:

[root@111 ~]# chkconfig --list|grep telnet

ekrb5-telnet: off

krb5-telnet: off

[root@111 ~]#

注意檢查結果這裡是關閉狀態


2、打開telnet服務:

[root@111 ~]# chkconfig krb5-telnet on

[root@111 ~]# chkconfig --list|grep telnet

ekrb5-telnet: offv

krb5-telnet: on


[root@111 ~]#

檢查已經被打開了


3、修改登陸文件securetty,主要增加要登陸的終端點

[root@111 ~]# vi /etc/securetty


增加如下幾行:

pts/1

pts/2

pts/3

pts/4

pts/5

……

保存退出即可。


如果是chkconfig krb5-telnet on


會提示Unencrypted connection refused. Goodbye.Connection closed by foreign host.看錯誤信息好像是說的為加密的連接被拒絕,查看了他的配置文件也沒發現有什麼關於加密的選項,而且配置文件也很正確,於是到google上去搜索了一大圈,最後終於找到一個老外寫的一個解決方法:

I really needed a bit of guidance and you provided it./sbin/chkconfig --list |grep telnetThe above command told me I had both krb5-telnet and ekrb5-telnet, andalso the installed telnet all on. Initially I did not know what theywere all for. After turning them on and off and testing my telnetconnection from another box I realised that "ekrb5-telnet" was theencrypted telnet server that I needed to turn off to run "krb-telnet"which allowed non-encrypted telnet connections.eg /sbin/chkconfig ekrb5-telnet offThanks for your help.


原來ekrb5-telnet是一個需要加密的telnet服務,把這個服務啟動上當然就需要加密了。解決方法:將/etc/xinetd.d/ekrb5-telnet裡面的disable改成=yes,再重啟xinetd服務service xinetd restart就OK了!

copyright © 萬盛學電腦網 all rights reserved