SSH public key Without Password Authentication 1) generate a password for 1ssh-keygen-t rsa-p' on the master host and press Enter. The command is generated in the user's main directory by default. ssh directory. You have two key pair files: id_rsa and id_rsa.pub 1 [master @ hadoop ~] $ Ll. ssh/2-rw -------. 1 master 1675 Jun 3 id_rsa3-rw-r -- r --. 1 master 402 Jun 3 id_rsa.pub then configure the following on the master node and append id_rsa.pub to the authorized key. 1cat ~ /. Ssh/id_rsa.pub> ~ /. Ssh/authorized_keys thought this would be done, and it was found that the command ssh localhost still requires a password. After a long time, I finally found the cause and found the server to modify the SSH configuration file "/etc/ssh/sshd_config". Modify the following content (remove the preceding comment) 1 RSAAuthentication yes # enable RSA Authentication 2 PubkeyAuthentication yes # enable public key/private key pair authentication method 3 AuthorizedKeysFile. ssh/authorized_keys # After setting the public key file path (the same as the file generated above), remember to restart SSH service 1 service sshd restart to re-verify ssh localhost, the same principle applies when logging on to other machines remotely without a password. You only need to upload the id_rsa.pub generated by the local machine to other servers for the same operation.