Environment Description:
1. CentOS 6.x system, using the root account to set the secret key mode login;
2. When configuring multiple host keys, partial success, partial unsuccessful;
3. Security log/var/log/secure has been closed, no records;
4./etc/selinux/config in selinux=disabled.
This problem plagued a relatively long time, from the Internet search, most of the problem is said permission, but I have set the permissions,
Configuration file/etc/ssh/sshd_config is the same, there is no reason some hosts can log in, some can not login ah,
Permissions View:
ll-d. ssh/
DRW-------2 root root 4096 Dec 6 15:33. ssh/
LL. Ssh/authorized_keys
-RW-------1 root root 666 Dec 6 13:08. Ssh/authorized_keys
If not, you can set this:
chmod. ssh/
chmod. Ssh/authorized_keys
Problem solving:
The problem was later detected by the-d parameter of ssh ,
Server-side open temporary port and debug debug information:
/usr/sbin/sshd-p 10022-d
Client Links:
Ssh-p 10022 [email protected]
Service-Side output:
Slightly......
Debug1:trying Public Key File/root/.ssh/authorized_keys
DEBUG1:FD 4 Clearing O_nonblock
Authentication Refused:bad ownership or modes for Directory/root
Slightly......
The above red font description is the/root directory permissions problem, boarded the view, sure enough, the permissions are not correct, modified to 755:
chmod 755/root/
Log in again, everything is OK.
This article is from the top leaderboard blog, so be sure to keep this source http://top88.blog.51cto.com/11341662/1885168
SSH key failed to debug