telnetd 程序是一个支持 DARPA telnet 交互式通信协议的服务器。未使用加密通信,一般用在内网中,不推荐在公网暴露(一般使用 openssh-server 替代)
介绍
- telnet 服务是非加密的,远程主机推荐使用 SSH
安装
apt install telnet telnetd-ssl -y
- ubuntu 24.04 中 /etc/inetd.conf中有 telnet 的服务配置(旧版本可能在 /etc/xinetd.d/telnet中配置)
telnet		stream	tcp	nowait	telnetd-ssl	/usr/sbin/tcpd	/usr/sbin/in.telnetd
- 启动服务(旧版本可能是 xinetd),默认监听在 23端口
systemctl start inetd.service
$ telnet 192.168.179.159
Trying 192.168.179.159...
Connected to 192.168.179.159.
Escape character is '^]'.
Ubuntu Noble Numbat (development branch)
ubuntu24 login: root
Password:
Welcome to Ubuntu Noble Numbat (development branch) (GNU/Linux 6.8.0-11-generic x86_64)
...
- 更多帮助参考 man /usr/sbin/in.telnetd