Configure passwordless ssh access for HBase
- On node-1, stop HBase service.
On node-1, log in as an HBase user and generate an SSH key pair.
$ ssh-keygen -t rsaThe system prints the location of the key pair to standard output. The default name of the public key is id_rsa.pub.
Create a directory to hold the shared keys on the other nodes.
- On node-2, log in as an HBase user and create an .ssh/ directory in your home directory.
- On node-3, log in as an HBase user and create an .ssh/ directory in your home directory.
Use Secure Copy (scp) or any other standard secure means to copy the public key
from node-1 to the other two nodes. On each node in the cluster, create a new file
called .ssh/authorized_keys (if it does not already exist) and append the contents of
the id_rsa.pub file to it.
$ cat id_rsa.pub >> ~/.ssh/authorized_keysEnsure that you do not overwrite your existing .ssh/authorized_keys files by concatenating the new key onto the existing file using the >> operator rather than the > operator.
Use Secure Shell (SSH) from node-1 to either of the other nodes using the same user
You should not be prompted for password.
- On node-2, repeat Step 5, because it runs as a backup Master.