SSH password-free login configuration in CentOS
When we installed Hadoop in CentOS, we had to configure SSH password-free login configuration. Many methods have been collected on the Internet, which cannot be solved. I started to log on with a common user and the configuration failed multiple times. Later I changed my identity as root, just a moment! In the past, the configuration in Ubuntu was successful for common users. Why can't it work after Centos?
Later, a friend reminded me that it was probably a permission issue. Centos6.0 has enabled SElinux and has strict permission requirements on network services. I tried to disable SElinux and reconfigure it to solve the problem. The configuration method is as follows.
First switch to the root identity and disable SElinux:
[Root @ bogon ~] # Vi/etc/selinux/config
Set SELINUX = disabled
Then restart.
Log on as a common user and enter the following command:
Ssh-keygen-t dsa
Press enter, and then:
Cd ~ /. Ssh
Cat id_dsa.pub> authorized_keys
Test: ssh localhost
###