When using SSH to log on to a Linux cloud server, even if the password is entered correctly, an error message similar to the following appears:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
SSHD[10826]: Connection closed by 192.168.0.1.
Disconnected:no supported authentication methods available.
But through the management terminal can log on normally.
problem reason : This problem is usually caused by the SSH service modifying the passwordauthentication parameter, and disabling password Authentication logins.
treatment : To resolve this issue, please check and modify the following configuration:
Access the system through the management terminal.
See if/etc/ssh/sshd_config contains a configuration similar to the following: Passwordauthentication no #说明: This parameter is enabled by default, and the default value is yes.
If you need to modify the relevant policy configuration, file backups are recommended before continuing.
Use an editor such as Vim to set the parameter value to Yes, or to complete the entire row with a delete or comment (# Number added at the beginning).
Like what:
Vim/etc/ssh/sshd_config # Edit config file
Shift + i # enter Vim's edit mode
# passwordauthentication No # comment out this parameter C9/>esc # Exit Vim's edit mode
shift + ZZ # Save changes and exit
Restart the SSH service using the following instructions:
Service sshd Restart
Try to log on to the server again.