When using SSH to log in to the ECS (Elastic Compute Server) Linux server, even if the password is entered correctly, an error message similar to the following will appear:
No supported authentication methods available
or
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
This problem is usually caused by the SSH service modifying the PasswordAuthentication parameter and disabling password authentication login.
Solution : To solve this problem, please check and modify the following configuration:
Enter the system through the management terminal.
Check whether /etc/ssh/sshd_config contains a configuration similar to the following through instructions such as cat:
PasswordAuthentication no
Note: This parameter is enabled by default, and the default value is yes.
If you need to modify the relevant policy configuration, it is recommended to perform a file backup before continuing.
Use an editor such as vi to set the parameter value to yes, or delete or comment the entire configuration line (add # at the very beginning). such as:
PasswordAuthentication yes
Use the following command to restart the SSH service:
service sshd restart
Try to log in to the server again.