关闭防火墙并禁止开机自启
systemctl stop firewalld.service
systemctl disable firewalld
1、检查telnet是否安装
rpm -qa | grep telnet
2、yum安装telnet
yum -y install telnet telnet-server xinetd
3、设置xinetd开机自启
systemctl enable xinetd.service
4、设置telnet开机自启
systemctl enable telnet.socket
5、启动telnet服务
systemctl start telnet.socket
systemctl start xinetd
6、配置防火墙规则(如果关闭防火墙了,就不需要这一步了)
firewall-cmd --permanent --add-port=23/tcp
firewall-cmd --reload
7、默认Root无法远程访问,因此需要修改以下配置文件
/etc/securetty
vi /etc/securetty
在末尾添加
pts/0
pts/1
8、查看telnet服务是否启动
ps -ef| grep 23