Thursday, July 2, 2015

Hadoop passwordless SSH authentication

Hadoop.SSH.PublicKey.Authentication

1.      Generate public and private SSH keys on the Primary Server host.
ssh-keygen
2.      Copy the SSH Public Key (id_rsa.pub) to the user account on your target hosts.
.ssh/id_rsa
.ssh/id_rsa.pub
3.      Add the SSH Public Key to the authorized_keys file on your target hosts.
cat id_rsa.pub >> authorized_keys
4.      Depending on your version of SSH, you may need to set permissions on the .ssh directory (to 700) and the authorized_keys file in that directory (to 600) on the target hosts.
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
5.      From the Primary Server, make sure you can connect to each host in the cluster using SSH, without having to enter a password.
ssh root@<remote.target.host>


No comments:

Post a Comment