1.安装telnet
yum install telnet telnet-server xinetd -y
2.启动telnet
systemctl start telnet.socket systemctl enable telnet.socket
3.添加防火墙配置
firewall-cmd --permanent --add-port=23/tcp firewall-cmd --reload
# 为了方便,关闭防火墙
暂时关闭防火墙
systemctl stop firewalld
service iptables stop
永久关闭
systemctl disable firewalld
chkconfig iptables off
重启防火墙
systemctl enable firewalld
service iptables restart