在Debian系统下开启Telnet服务,可以按照以下步骤进行操作:
systemctl
命令更新系统包列表:
sudo apt update
安装Telnet服务器:
sudo apt install inetd
启用并启动Telnet服务:
sudo systemctl enable telnet.socket
sudo systemctl start telnet.socket
检查Telnet服务状态:
sudo systemctl status telnet.socket
xinetd
(适用于较旧的系统)安装xinetd
:
sudo apt update
sudo apt install xinetd
编辑/etc/xinetd.d/telnet
文件:
sudo nano /etc/xinetd.d/telnet
确保文件内容如下:
service telnet
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
重启xinetd
服务:
sudo systemctl restart xinetd
检查Telnet服务状态:
sudo systemctl status xinetd
ufw
来配置防火墙规则:sudo ufw allow 23/tcp
sudo ufw reload
通过以上步骤,你应该能够在Debian系统上成功开启Telnet服务。