SSH Key Generation Reference
SSH Key Generation Reference
$ su - hduser
Note: Empty key is not recommended but here we are putting the key as
empty as we don't want to enter the password every time hadoop
interacts with its nodes.
Now since the key pair is generated we have to enable SSH access
to local machine with this newly created key. For that you have
put the below command.
The step is also needed to save your local machine’s host key
fingerprint to the hduseruser’s known_hosts file. If you have any
special SSH configuration for your local machine like a non-
standard SSH port, you can define host-specific SSH options
in$HOME/.ssh/config
$ ssh localhost
On CentOS:
Password Less SSH Authentication On All The Nodes Of Hadoop Cluster
In many cases the administrator has to log on to the remote nodes in the
network. in case of a small network it is easy way to co-ordinate them one
by one. If we consider a Data Center, it may consist of thousands of nodes
connected together and it will be a difficult job to go and work with each
nodes. We can make use of SSH (Secure SHELL). It is one of the most
trusted open source network protocol that can be used to log on to the
remote node/machine in the same network. We can use it to transfer files
across nodes using a secure protocol called SCP (Secure Copy).
We can use open SSH either of the two ways, one using the remote machine
password and the another one is using password less ssh login using the
ssh Keys. Let's see how to setup password-less login using SSH keys to
connect to remote Linux servers without entering password.
192.168.1.101 n1.xyz.com n1
192.168.1.102 n2.xyz.com n2
192.168.1.103 n3.xyz.com n3
192.168.1.104 n4.xyz.com n4
192.168.1.105 n5.xyz.com n5
[root@n1 ~]$ ssh [email protected] "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"
[email protected]'s password: [Enter Your Password Here]
Step 5: Login from 192.168.1.101 to 192.168.1.* node without Password
From now onwards you can log into 192.168.1.102 as root user from
server 192.168.1.101 as root user without password.