Today in two machines A and B set the password-free login, a machine is centos6.5,b machine is Centos7, I want to pass a machine password-free login to B machine, in two machines set up a public key and private key, on a machine via SSH connection B machine, each time I want to manually enter the password, Previously configured and did not appear this situation, and confirmed several times ~/.ssh directory Permissions 700, under which all file permissions 600, but still failed . After searching the internet,
The strictmodes is set to No in the sshd_config of the B machine, and after the sshd (/bin/systemctl restart Sshd.service) is restarted, the password can be signed in again.
And then I checked the explanation about Strictmodes.
Strictmodes no #修改为no, the default is yes. If you do not modify the login with key is the presence of server refused our key (if strictmodes for Yes must ensure that the owner of the folder holding the public key is the same as the login user name.
"Strictmodes" Sets whether SSH checks the permissions and ownership of the user home directory and the rhosts file before receiving the logon request. This is usually necessary because novices often set their own directories and files to anyone with write access. )
(Source http://matt-u.iteye.com/blog/851158)
Strictmodes parameters for Linux under Sshd_config