The first node on the cluster (node-1) must be able to log
in to other nodes on the cluster and then back to itself in order to start the daemons. You
can accomplish this by using the same user name on all hosts and by using passwordless
Secure Socket Shell (SSH) login.
On node-1, stop HBase service.
On node-1, log in as an HBase user and generate an SSH key pair.
$ ssh-keygen -t rsa
The 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_keys
Ensure 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
name.
You should not be prompted for password.
On node-2, repeat Step 5, because it runs as a backup Master.