Q: 在SLES8上如何設置telnet服務
A: 在SLES8中可以用yast inetd來配置打開telnet服務,也可以通過修改配置文件的方式加以支持
方法1. 通過yast2管理工具進行配置
在console中運行yast2工具激活inetd以及telnet服務
# yast2 inetd
"Enable/disable inetd" 選擇 "On with custom configuration ..." 然后單擊"Next"按鈕
"Enable/disable network services" 激活
"telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd"對應的行,然后單擊"Finish"按鈕
方法2. 通過修改相關配置文件并運行命令管理進行配置
編輯/etc/inetd.conf文件,去掉下面這行前面的注釋:
#telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
然后運行如下命令激活inetd服務并啟動inetd
# chkconfig -a inetd
# /etc/init.d/inetd start
檢查及排錯:
可以用下面的命令查看ftp服務有沒有起來
# netstat -l | grep telnet
telnet服務缺省禁止root用戶使用.因為telnet口令傳輸使用明文,從安全的角度考慮不建議
開放root用戶的telnet限制.
可以編輯/etc/securitty文件添加行
pts/1
pts/2
pts/3
pts/4
pts/5
pts/6
打開root用戶的telnet限制