概述

由于升级OpenSSH服务需要临时设置Telnet访问,在输入正确信息后遇到问题后进行记录。

错误信息

配置完成Telnet后进行连接发现无法登陆,提示登陆失败

[root@localhost ~]# telnet 127.0.0.1
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.

Kernel 3.10.0-1127.el7.x86_64 on an x86_64
localhost login: root
Password: 
Login incorrect

查看报错内容

[root@localhost ~]# tail -n 100 /var/log/secure
Jun 30 15:06:17 localhost login: pam_securetty(remote:auth): access denied: tty 'pts/1' is not secure !
Jun 30 15:06:20 localhost login: pam_succeed_if(remote:auth): requirement "uid >= 1000" not met by user "root"
Jun 30 15:06:22 localhost login: FAILED LOGIN 1 FROM localhost FOR root, Authentication failure
Jun 30 15:06:41 localhost login: pam_securetty(remote:auth): access denied: tty 'pts/1' is not secure !
Jun 30 15:06:42 localhost login: pam_unix(remote:auth): check pass; user unknown
Jun 30 15:06:42 localhost login: pam_unix(remote:auth): authentication failure; logname= uid=0 euid=0 tty=pts/1 ruser= rhost=localhost
Jun 30 15:06:44 localhost login: FAILED LOGIN 2 FROM localhost FOR (unknown), User not known to the underlying authentication module
Jun 30 15:06:45 localhost login: pam_securetty(remote:auth): access denied: tty 'pts/1' is not secure !
Jun 30 15:06:45 localhost login: pam_unix(remote:auth): check pass; user unknown
Jun 30 15:06:46 localhost login: FAILED LOGIN SESSION FROM localhost FOR (unknown), User not known to the underlying authentication module
Jun 30 15:06:46 localhost login: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=pts/1 ruser= rhost=localhost

解决办法:
在/etc/securetty文件中添加tty内容

借鉴自:https://www.programmersought.com/article/66085516467/


分类: Linux