linux 用SSH连接No further authentication methods available"问题

解决办法:以root身份在控制台登录,用vi或其它编辑器修改/etc/ssh/sshd_config文件,将
#PasswordAuthentication no
一行改成
PasswordAuthentication yes
保存修改后退出。重起sshd:
myhost# kill -HUP `cat /var/run/sshd.pid`
即可。

修改/etc/ssh/sshd_config文件时注意检查一下PermitRootLogin的配置,如果是
PermitRootLogin yes
可能会带来安全隐患,建议将此句用“#”注释掉,或者改成
PermitRootLogin no
缺省是no。

当然如果确实需要用root登录,别忘了给root加一个复杂一点的密码,没有密码是不能通过登录的,除非

PermitEmptyPasswords设成了yes,不过这是严重不推荐的。

原文地址:https://www.cnblogs.com/lovlos/p/6596804.html