Debian中Telnet故障排查方法如下:
sudo systemctl status telnet
或 sudo systemctl status inetd
。sudo apt update && sudo apt install telnetd
或 telnet
。sudo ufw status
查看UFW防火墻規則,確保允許Telnet端口(23):sudo ufw allow 23/tcp
。sudo iptables -L
,添加規則sudo iptables -A INPUT -p tcp --dport 23 -j ACCEPT
。ping
命令測試與目標主機的連通性。telnet <目標IP> 23
測試端口連接,查看是否顯示“Connected”。/etc/xinetd.d/telnet
,確保disable=no
且配置正確,重啟xinetd服務:sudo systemctl restart xinetd
。sudo journalctl -u telnet
或/var/log/syslog
、/var/log/auth.log
獲取錯誤信息。nmap -p 23 <目標IP>
檢測端口是否開放。netstat -tuln | grep 23
或ss -tuln | grep 23
查看本地端口監聽狀態。sudo apt install openssh-server
。注:若涉及SELinux,需檢查狀態并調整策略(僅適用于支持SELinux的系統)。