在Ubuntu系统中,开启Telnet服务需要安装并启动telnetd
。以下是详细步骤:
apt
安装并启动Telnet服务更新软件包列表:
sudo apt update
安装Telnet服务器:
sudo apt install telnetd
启动Telnet服务:
sudo systemctl start inetd
或者,如果你使用的是较旧的系统,可能需要手动启动Telnet服务:
sudo service inetd start
启用Telnet服务开机自启:
sudo systemctl enable inetd
或者:
sudo service inetd enable
检查Telnet服务状态:
sudo systemctl status inetd
或者:
sudo service inetd status
xinetd
安装并启动Telnet服务更新软件包列表:
sudo apt update
安装xinetd
和Telnet服务器:
sudo apt install xinetd telnetd
配置xinetd
以启动Telnet服务:
编辑/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
sudo ufw allow 23/tcp
或者使用iptables
:sudo iptables -A INPUT -p tcp --dport 23 -j ACCEPT
通过以上步骤,你应该能够在Ubuntu系统中成功开启Telnet服务。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
相关推荐:ubuntu如何开启telnet服务