SSH login-permission denied/authentication methods available

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.