Ssh password-less hand settings because many configurations on the Internet and password-less login are not easy to use, I just wrote a plug-in for your reference, I have prepared three test machines, the requirement is that all three machines can access each other without a password. The steps are as follows: www.2cto.com Java code 192.168.100.67 master 192.168.100.68 slave1 192.168.100.69 slave2 enters the master (hadoop user) and runs: ssh-keygen-t rsa to enter ~ /. The id_rsa id_rsa.pub cp id_rsa.pub authorized_keys generated by the ssh directory is then confirmed that the authorized_keys permission is 600. If not, the other chmod 600 id_rsa permissions are 644, and then the ssh master date test enters Slav ~ /. The ssh directory puts the ssh-keygen-t rsa on the master into the chmod 600 id_rsa directory. Then the ssh slave1 date test is performed on the master and slave1 to test each other. slave2 and slave1 are actually cp id_rsa.pub authorized_keys, it is best to use the cat command. I am saving things in graph. In addition, I am too lazy about scp, so it is easy to understand that three machines use the same private key, so it is enough to generate a set of public keys ~ /. The permissions of the ssh directory and the following files must be identical. If they are different, they will not work. I generally run the ssh-keygen-t rsa command on all three machines to save trouble. Then, I overwrite the key pair generated by one machine to the other two machines and use chmod as the same permission, that is, id_rsa 600 id_rsa.pub 644 authorized_keys 644. Because the keys are the same, you can connect yourself to other machines. If you cannot connect, check whether the/etc/hosts file is not configured.