Password-free login setting of ubuntu system ssh during hadoop installation
At the beginning of contact, not very familiar with, make a small record, correct later
Generate public and private keys
Ssh-keygen-t dsa-P''- f ~ / .ssh/id_dsa
Import the public key into the authorized_keys file
Cat ~ / .ssh/id_dsa.pub > > ~ / .ssh/authorized_keys
Normally, ssh will not need to use a password when logging in at this time.
If prompted: Permission denied, please try again
Modify ssh configuration, path / etc/ssh/sshd_config
PermitRootLogin without-password
Change it to PermitRootLogin yes
If you still need to use a password during ssh after the above configuration, there should be a problem with the public key of the current machine. You can send the public key of the target machine to the current machine again and import it into the authorized_keys file again.
For example, master can log in to slave without a password, but slave cannot log in to master, indicating that there is a problem with the public key of slave. In this case, send the authorized_keys of master to master.