当前位置:网站首页>Disconnected: No supported authentication methods available (server sent: )

Disconnected: No supported authentication methods available (server sent: )

2022-06-25 12:28:00 Yu Qin

When using SSH Log in to ECS ECS (Elastic Compute Server) Linux Server time , Even if the password is entered correctly , The following error messages will also appear :

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

But the same user , adopt Management terminal Can log in normally .

Question why


The problem is usually due to SSH Service modified PasswordAuthentication Parameters , Password authentication login disabled .

Treatment method


To solve this problem , Please check and modify the following configuration :

  1. adopt Management terminal Entry system .
  2. adopt cat Wait for instructions to see /etc/ssh/sshd_config Whether it contains configurations similar to the following :
    PasswordAuthentication no
    #  explain : This parameter is enabled by default , The default value is  yes.
  3. If you need to modify the relevant policy configuration , It is recommended to back up the files before continuing .
  4. Use vi Wait for the editor , Set the parameter value to yes, Or delete the whole or comment ( Add... At the beginning # Number ) Whole line configuration . such as :
    # PasswordAuthentication no
  5. Restart with the following command SSH service :
    service sshd restart
  6. Try logging in to the server again .
原网站

版权声明
本文为[Yu Qin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200531437230.html