跳转到主要内容

centos 配置telnet登陆

相关软件安装
yum install telnet telnet-server xinetd
修改 pam 模块 telnet 权限

将etc/pam.d/remote中的auth required pam_securetty.so注释掉

修改 pam 模块 telnet 权限
# 修改前
[root@localhost ~]# grep 'pam_securetty.so' /etc/pam.d/remote 
auth       required     pam_securetty.so

# 修改后 -- 注释掉
[root@localhost ~]# grep 'pam_securetty.so' /etc/pam.d/remote 
# auth       required     pam_securetty.so
新建配置文件
[root@localhost ~]# cat << EOF > /etc/xinetd.d/telnet
service telnet
{
    flags = REUSE
    socket_type = stream
    wait = no
    user = root
    server = /usr/sbin/in.telnetd
    log_on_failure += USERID
    disable = no
}
EOF
启动服务
systemctl start telnet.socket
systemctl start xinetd