1、[root@localhost ~]# telnet
2、 查詢了是否安裝Telnet包,結果如下:
telnet-server-0.17-47.el6.i686
[ xinetd (pid 2967) 正在運行...
在系統服務里面,也查看過,telnet服務和xinetd也都是工作狀態。
centos、ubuntu
yum install telnet-server 安裝telnet服務
方法一:使用ntsysv,在出現的窗口之中,將 telnet 勾選起來,然后按下 OK 即可!
#chkconfig telnet on
vi /etc/xinetd.d/telnet
# default: yes
# unencrypted username/password pairs for authentication.
{
socket_type = stream
user = root
log_on_failure += USERID
}
telnet 是掛在 xinetd 底下的,所以自然只要重新激活 xinetd 就能夠將 xinetd 里頭的設定重新讀進來,所以剛剛設定的 telnet 自然
# servicexinetd restart
當你啟動telnet服務后,你可以用netstat –tunlp命令來查看telnet服務所使用的端口,可以發現有23。使用下面命令開啟這些端口:
iptables -I INPUT -p tcp --dport 23 -jACCEPT
iptables -I INPUT -p udp --dport 23 -jACCEPT
service iptables save //保存
service iptables restart //重啟防火牆
或者來點狠的!!關閉防火牆!
service iptables stop
下面我們來看一下二種錯誤:
[ Trying 192.168.1.87...
telnet: Unable to connect to remote host:No route to host
解決方法:這種問題防火牆沒有允許telnet服務,連接被阻止,默認CentOS只允許SSH,所以進入其自定義選項,在telnet前打個勾!
第二種 :
Trying 172.25.1.3...
Escape character is '^]'.
Temporary failure in name resolution: Illegal seek
這一個就是/etc/hosts文件配置問題
[linux@localhost ~]$ more /etc/hosts
# that require network functionality willfail.
::1localhost6.localdomain6localhost6
192.168.1.86
說明:因為客戶機的名字不好記就沒寫進去,內容格式應為127.0.0.1 pcname
2、 查詢了是否安裝Telnet包,結果如下:
telnet-server-0.17-47.el6.i686
[ xinetd (pid 2967) 正在運行...
在系統服務里面,也查看過,telnet服務和xinetd也都是工作狀態。
centos、ubuntu
yum install telnet-server 安裝telnet服務
方法一:使用ntsysv,在出現的窗口之中,將 telnet 勾選起來,然后按下 OK 即可!
#chkconfig telnet on
vi /etc/xinetd.d/telnet
# default: yes
# unencrypted username/password pairs for authentication.
{
socket_type = stream
user = root
log_on_failure += USERID
}
telnet 是掛在 xinetd 底下的,所以自然只要重新激活 xinetd 就能夠將 xinetd 里頭的設定重新讀進來,所以剛剛設定的 telnet 自然
# servicexinetd restart
當你啟動telnet服務后,你可以用netstat –tunlp命令來查看telnet服務所使用的端口,可以發現有23。使用下面命令開啟這些端口:
iptables -I INPUT -p tcp --dport 23 -jACCEPT
iptables -I INPUT -p udp --dport 23 -jACCEPT
service iptables save //保存
service iptables restart //重啟防火牆
或者來點狠的!!關閉防火牆!
service iptables stop
下面我們來看一下二種錯誤:
[ Trying 192.168.1.87...
telnet: Unable to connect to remote host:No route to host
解決方法:這種問題防火牆沒有允許telnet服務,連接被阻止,默認CentOS只允許SSH,所以進入其自定義選項,在telnet前打個勾!
第二種 :
Trying 172.25.1.3...
Escape character is '^]'.
Temporary failure in name resolution: Illegal seek
這一個就是/etc/hosts文件配置問題
[linux@localhost ~]$ more /etc/hosts
# that require network functionality willfail.
::1localhost6.localdomain6localhost6
192.168.1.86
說明:因為客戶機的名字不好記就沒寫進去,內容格式應為127.0.0.1 pcname