CentOS password failed when using key to log on to the server

Source: Internet
Author: User
Problem

Configure the various settings for key login on the target server;
Log in using SSH on the local machine.
A password exception occurred;
A password was found prompting for a user password instead of a key.

Solution:

CentOS is turned on by default, and the program needs to be closed manually.
Use:
/usr/sbin/setenforce 0 Close SELINUX immediately
Secondly:
Open/etc/selinux/config with text editing tools
Comment out the selinux=enforcing: #SELINUX =enforcing, then add a new behavior: selinux=disabled exits and saves.
Restart the sshd service.

It may be that SELinux is turned on and the sshd login cannot be verified using key mode.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

CentOS password failed when using key to log on to the server

Related Article

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.