在 Linux 下查看 telnet 状态,通常可以从服务状态、端口监听状态、是否能连接三个层面来查。下面按常见场景说明。
systemctl status telnet.socket
# 或
systemctl status inetd
如果看到 active (running) 表示 telnet 服务已启用。
注意:很多系统默认 没有安装 telnet 服务,而是使用
xinetd或inetd管理。
systemctl status xinetd
然后检查配置:
cat /etc/xinetd.d/telnet
看是否有:
disable = no
ss -lntp | grep 23
netstat -lntp | grep 23
如果看到类似:
LISTEN 0 128 :::23
说明 telnet 端口在监听。
which telnet
telnet IP地址 23
例如:
telnet 192.168.1.10 23
Connection refused → 服务未开No route to host → 网络或防火墙问题iptables -L -n | grep 23
# 或
firewall-cmd --list-all
⚠️ telnet 是明文协议,极不安全
生产环境强烈建议使用:
sshnc / nmap 做端口测试如果你能告诉我:
我可以给你更精确的命令。