我在通过密码登录服务器时遇到问题,即使我通过usermod
. 我已经设置PasswordAuthentication yes
并sshd_config
重新启动了 ssh 守护进程。我什至多次设置用户密码。但是,当我尝试登录到我的服务器时,sshd 显示以下日志输出:
Jan 24 21:18:31 ip-10-36-13-72 sshd[11756]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=173.12.2.64 user=jimuser
Jan 24 21:18:34 ip-10-36-13-72 sshd[11756]: Failed password for jimuser from 173.12.2.64 port 15508 ssh2
在这一点上,我真的不知道在哪里看。有任何想法吗?
更新:
/etc/pam.d/sshd
#%PAM-1.0
auth required pam_sepermit.so
auth include password-auth
account required pam_nologin.so
account include password-auth
password include password-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open env_params
session optional pam_keyinit.so force revoke
session include password-auth
/etc/pam.d/system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth sufficient pam_unix.so try_first_pass nullok
auth required pam_deny.so
account required pam_unix.so
password requisite pam_cracklib.so try_first_pass retry=3 type=
password sufficient pam_unix.so try_first_pass use_authtok nullok sha512 shadow
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so