在 Debian 系统中使用 telnet 涉及“两类权限”,具体取决于你是使用 telnet 客户端还是运行 telnet 服务端。
telnet example.com 23
telnet 客户端sudo apt update
sudo apt install telnet
注意:Debian 默认 不安装 telnet 客户端
telnet 服务监听 23 端口(<1024),只有 root 能绑定:
sudo apt install telnetd
sudo systemctl start inetd # 或 xinetd
/etc/passwd/etc/security/access.conf 限制⚠️ telnet 是明文传输,包括账号密码
强烈不建议在公网使用
推荐替代:
ssh user@host
Permission deniedConnection refused| 使用方式 | 是否需要 root |
|---|---|
| telnet 客户端连接 | ❌ 不需要 |
| 安装 telnet 客户端 | ✅ 需要 sudo |
| 运行 telnet 服务端 | ✅ 需要 root |
| 登录 telnet 服务 | 系统用户权限 |
如果你愿意,我可以: