一、查看telnet-server、telnet是否安装
rpm -qa telnet-server
rpm -qa telnet
没有输出telnet的版本,什么都没有输出,表示未安装
二、安装telnet服务
yum list | grep telnet
yum install -y telnet-server.x86_64
yum install -y telnet.x86_64
三、检查xinetd是否开启
service xinetd restart
显示红色区域提示,则表示没有安装
四、安装xinetd
yum list | grep xinetd
yum install -y xinetd.x86_64
五、再次输入 service xinetd restart 检查,红色区域提示表示成功
将xinetd里面disable参数值设为no
vi /etc/xinetd.d/telnet
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
再次service xinetd restart,上一步换了里面属性,所以要重启一次
六、验证
telnet 127.0.0.1
输入logout,又回到root模式
七、常见报错
Kernel 3.10.0-693.2.2.el7.x86_64 on an x86_64
iZwz95a6wosz6klzf7o6hcZ login: root
Password:
Login incorrect
解决办法:
注释/etc/pam.d/remote的第一行,即:auth required pam_securetty.so
[root@iZwz95a6wosz6klzf7o6hcZ pam.d]# cat remote
#%PAM-1.0
#auth required pam_securetty.so
auth substack password-auth
auth include postlogin
account required pam_nologin.so
account include password-auth
password include password-auth
标签:64,ip,auth,server,xinetd,telnet,yum,本机
From: https://www.cnblogs.com/chunjeh/p/17510820.html