profile_pic

You can fo↑↑ow my blog

WX:_2guagua

问题描述

No supported authentication methods available

问题分析

1、用户文件夹权限问题。

例如:在/home目录下使用命令chmod 777 -R

2、ssh配置问题

参数 PasswordAuthentication 的默认值为 yes,SSH服务将其值置为 no 以禁用密码验证登录,导致此类故障。需要修改 PasswordAuthentication 配置解决此问题。

解决方案

方法一:

ssh工具连接时,登陆类型选择“秘钥文件”,输入用户名,并使用ssh秘钥。

方法二:

进入 管理终端 连接并登录到Linux实例。

执行命令 cat /etc/ssh/sshd_config 查看SSH服务配置,并注意是否包含类似如下配置:

#PasswordAuthentication yes
#PermitFmptyPasswords no
PasswordAuthentication no

执行命令 vi /etc/ssh/sshd_config,按下 i 编辑SSH服务配置文件,将参数 PasswordAuthentication 设置为 yes,或者在 PasswordAuthentication 参数前添加井号(#),按下 Esc 退出编辑模式,并输入 :wq保存退出。

重启 SSH 服务
systemctl restart sshd

(说明:如果您使用CentOS 6的镜像,则执行service ssh restart命令,重启SSH服务。)
使用SSH客户端重新登录Linux实例。使用SSH客户端重新登录Linux实例。

标签: none

添加新留言