表象
/var/log/message# error Could not get shadow information for <user>Jul 30 14:36:39 hessian01 sshd[61866]: Failed password for zhanghq from 192.168.2.176 port 41192 ssh2Jul 30 14:36:43 hessian01 sshd[61866]: Connection closed by authenticating user zhanghq 192.168.2.176 port 41192 [preauth]Jul 30 14:36:55 hessian01 sshd[61868]: error: Could not get shadow information for zhanghqJul 30 14:36:55 hessian01 sshd[61868]: Failed password for zhanghq from 192.168.2.176 port 42058 ssh2Jul 30 14:37:05 hessian01 sshd[61868]: Failed password for zhanghq from 192.168.2.176 port 42058 ssh2Jul 30 14:37:08 hessian01 sshd[61868]: Failed password for zhanghq from 192.168.2.176 port 42058 ssh2Jul 30 14:37:08 hessian01 sshd[61868]: Connection closed by authenticating user zhanghq 192.168.2.176 port 42058 [preauth]
用户登录
[Administrator.xxk-d4] ? ssh zhanghq@192.168.2.177zhanghq@192.168.2.177's password:zhanghq@192.168.2.177's password:zhanghq@192.168.2.177's password:Permission denied (password).
解决办法
UsePAM 配置[root@hessian01 openssh-8.5p1]# tail -5 /etc/ssh/sshd_configPermitRootLogin yesPasswordAuthentication yesChallengeResponseAuthentication noUsePAM yes # 配置为 yesX11Forwarding yes
SELinux
[root@hessian01 openssh-8.5p1]# getenforceDisabled