在Ubuntu系统中开启Telnet服务,可以按照以下步骤进行:
systemctl
命令更新系统包列表:
sudo apt update
安装Telnet服务器:
sudo apt install telnetd
启用并启动Telnet服务:
sudo systemctl enable telnet.socket
sudo systemctl start telnet.socket
检查Telnet服务状态:
sudo systemctl status telnet.socket
配置防火墙(如果需要): 如果你的系统启用了防火墙(如UFW),你需要允许Telnet流量通过。可以使用以下命令:
sudo ufw allow 23/tcp
inetd
或xinetd
安装inetd
或xinetd
:
sudo apt install inetd
或者
sudo apt install xinetd
编辑/etc/inetd.conf
或/etc/xinetd.d/telnet
文件:
inetd
:sudo nano /etc/inetd.conf
telnet stream tcp nowait root /usr/sbin/in.telnetd
xinetd
: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
}
重启inetd
或xinetd
服务:
inetd
:sudo systemctl restart inetd
xinetd
:sudo systemctl restart xinetd
检查服务状态:
sudo systemctl status inetd
或者
sudo systemctl status xinetd
通过以上步骤,你应该能够在Ubuntu系统上成功开启Telnet服务。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读:centos怎么开启telnet服务