参考链接:http://www.gchao.com/knowledgebase.php?action=displayarticle&id=638
处理办法
要解决此问题,请进行如下配置检查和修改:
- 通过 管理终端 进入系统。
- 通过 cat 等指令查看 /etc/ssh/sshd_config中是否包含类似如下配置:
PasswordAuthentication no # 说明:该参数默认启用,默认值为 yes。
- 如果需要修改相关策略配置,在继续之前建议进行文件备份。
- 使用 vi 等编辑器,将参数值设置为 yes,或者整个删除或注释(在最开头添加 # 号)整行配置。比如:
# PasswordAuthentication no
- 使用如下指令重启 SSH 服务:
service sshd restart
- 再次尝试登录服务器。