Solve sshpublickey login pop-up password input prompt OS: centos6.x due to insufficient disk space, mount/home to a large hard disk, and then find that you cannot use a common account ssh login. New users cannot log on using ssh. The root account is normal. Initially identified... solve ssh public key login pop-up password input prompt OS: centos 6.x because the disk space is not enough, mount/home to a large hard disk, then found that you cannot use a common account ssh login. New users cannot log on using ssh. The root account is normal. It is preliminarily determined that the permission problem is caused by mounting the/home directory. Debugging procedure: use root account to executechmod 755/home to create a user test, add authorized_keys under. ssh, and add the local public key. Useradd testchmod 700/home/testsu testcdmkdir. the sshchmod 700. sshadd your public key. ssh/authorized_keyschmod 600. ssh/authorized_keys try to log on with the ssh-vvvT test@myserver.com and view/var/log/secure .... jun 18 16:32:05 test sshd [1019]: debug1: trying public key file/home/test /. ssh/authorized_keysJun 18 16:32:05 test sshd [1019]: debug1: restore_uid: 0/0Jun 18 16:32:05 test sshd [1019]: Failed publickey for tes T from xx. xx port 36222 ssh2 okay, login failed... View/var/log/audit. log. well, it's even more tragic, there is no record... (This problem is not done) view selinux execution getenforce, the status is Enforcingsetenforce 0 try, then ssh-vvvT test@myserver.com, succeeded! It must be related to selinux. Change selinux back first: setenforce 1 maybe home directory is badly labeled, restore/home directory label try restorecon-R-v/home then try ssh-vvvT test@myserver.com, succeeded! Done
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.