使用第三方SSH客户端远程连接Linux服务器时,提示“No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)”错误怎么办?

本文介绍使用第三方SSH客户端远程连接Linux服务器时,提示“No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)”错误的问题原因和解决方案。

问题现象

当您使用第三方SSH客户端远程连接轻云互联Linux系统的服务器时,输入正确的账号密码,也会出现类似以下错误信息。

Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
sshd[10826]: Connection closed by XX.XX.XX.XX
No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

putty fatal error

问题原因

该问题可能是服务器内禁用户使用密码方式连接。

SSH服务对应配置文件/etc/ssh/sshd_config中的参数PasswordAuthentication被设置为no,表示禁止以密码方式登录服务器,需要修改为yes

解决方案

  1. 使用轻云官网中服务器面板内控制台VNC方式登录机器实例
  2. 查看/etc/ssh/sshd_config的参数PasswordAuthentication配置是否有误。
    cat /etc/ssh/sshd_config

    如下图所示,PasswordAuthentication参数设置为no,表示禁止以密码方式登录,需要修改为yes

    image

  3. 修改PasswordAuthentication的参数PasswordAuthenticationyes
    1. 打开SSH配置文件。
      vi /etc/ssh/sshd_config
    2. PasswordAuthentication no修改为PasswordAuthentication yesimage
    3. 按Esc键,输入:wq保存修改。
  4. 执行如下命令,重启SSH服务。
    systemctl restart sshd.service
  5. 重新远程连接Linux云服务器,确保可以正常连接。

帮助中心 – 轻云互联

解决SSH远程连接Linux实例报“No supported authentication methods available (server sent: publickey, gssapi-keyex, gssapi-with-mic)”错误-云服务器 ECS-阿里云

使用第三方SSH客户端远程连接Linux实例时, 提示“No supported authentication methods available (server sent: publickey, gssapi-keyex, gssapi-with-mic)”错误怎么办?

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/318902.html

(0)
上一篇 1天前
下一篇 2022年4月18日 06:04

相关推荐

发表回复

登录后才能评论