先检查是否安装: telnet-server和xinetd
rpm -qa telnet-server
rpm -qa xinetd
如果没有安装,则安装:
yum list |grep telnet
------->
telnet.x86_64 1:0.17-60.el7 @base
dcap-tunnel-telnet.x86_64 2.47.10-5.el7 epel
libguac-client-telnet.x86_64 1:0.9.12-1.el7 epel
libtelnet.x86_64 0.21-5.el7 epel
libtelnet-devel.x86_64 0.21-5.el7 epel
libtelnet-utils.x86_64 0.21-5.el7 epel
telnet-server.x86_64 1:0.17-60.el7 base
yum list |grep xinetd
-------->
xinetd.x86_64 2:2.3.15-13.el7 base
执行安装:
yum -y install telnet-server.x86_64
yum -y install telnet.x86_64
yum -y install xinetd.x86_64
设置开机启动:
systemctl enable xinetd.service
systemctl enable telnet.socket
开启service:
systemctl start telnet.socket
systemctl start xinetd
开启防火墙端口:
firewall-cmd --permanent --add-port=23/tcp
firewall-cmd --reload
tail -f /var/log/secure
报错:
Mar 28 18:09:47 localhost login: PAM 2 more authentication failures; logname= uid=0 euid=0 tty=pts/1 ruser= rhost=::ffff:10.102.45.38 user=root
vi /etc/securetty
添加
pts/0
pts/1