当我们在sshd_config启用UsePAM,即配置
UsePAM yes
有可能会遇到错误
PAM is enabled. You may need to install a PAM control file
for sshd, otherwise password authentication may fail.
Example PAM control files can be found in the contrib/
subdirectory
解决办法,编辑/etc/pam.d/sshd
auth include system-auth
account required pam_nologin.so
account include system-auth
password include system-auth
session optional pam_keyinit.so force revoke
session include system-auth
session required pam_loginuid.so
查看文章:
openssh编译升级安装