Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Passwordless SSH Setup.

avatar
Contributor

Hi,

This is my first question here. I am very new to Hadoop, Big Data and Hortonworks.

I have created a five node (Virtual Machines) setup to get started. One VM is assigned for Ambari, another is a master node and the remaining are for data nodes.

When creating a passwordless SSH setup, do I need to create a setup from the master node and data nodes to Ambari node only, or from all nodes to all nodes?

Thanks in advance,

Regards,

Manoj.

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Manoj Dixit

In addition to my previous comment.

Password less SSH is ONLY Needed, When you want Ambari Server to automatically install Ambari Agents on all your cluster hosts, you must set up password-less SSH connections between the Ambari Server host and all other hosts in the cluster.

Other wise if you plan to install Ambari Agents on your own then you do not need to even setup the password less ssh.

You can choose to manually install the Agents on each cluster host. In this case, you do not need to generate and distribute SSH keys.

.

Please see:

Setting up Password less ssh: https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.1.0/bk_ambari-installation/content/set_up_passw...

Installing Ambari Agents Manually: https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.1.0/bk_ambari-reference/content/ch_amb_ref_inst...

.

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@Manoj Dixit

Yes, On the "Ambari Server" node you can run the following command to create the SSH keys:

# ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): (I  kept it EMPTY)
Enter same passphrase again: (I  kept it EMPTY)
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is: 
........

.

Then you can run the following command to pass the authorization key entry to the cluster nodes.

# ssh-copy-id -i ~/.ssh/id_rsa.pub localhost
# ssh-copy-id -i ~/.ssh/id_rsa.pub node1.exmaple.com
# ssh-copy-id -i ~/.ssh/id_rsa.pub node2.exmaple.com
# ssh-copy-id -i ~/.ssh/id_rsa.pub node2.exmaple.com
# ssh-copy-id -i ~/.ssh/id_rsa.pub node3.exmaple.com
# ssh-copy-id -i ~/.ssh/id_rsa.pub node4.exmaple.com

.

This thing you need to do only from "Ambari Server" node

avatar
Master Mentor

@Manoj Dixit

I edited my above command .... as by mistake i mentioned Master Node instead of Ambari Node.

Only Ambari Node is enough to be able to do passwordless ssh to all the cluster nodes.

So you need to run the above mentioned commands only from Ambari Server Node.

avatar
Contributor

Oh, okay, thanks,

avatar
Master Mentor

@Manoj Dixit

In addition to my previous comment.

Password less SSH is ONLY Needed, When you want Ambari Server to automatically install Ambari Agents on all your cluster hosts, you must set up password-less SSH connections between the Ambari Server host and all other hosts in the cluster.

Other wise if you plan to install Ambari Agents on your own then you do not need to even setup the password less ssh.

You can choose to manually install the Agents on each cluster host. In this case, you do not need to generate and distribute SSH keys.

.

Please see:

Setting up Password less ssh: https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.1.0/bk_ambari-installation/content/set_up_passw...

Installing Ambari Agents Manually: https://docs.hortonworks.com/HDPDocuments/Ambari-2.4.1.0/bk_ambari-reference/content/ch_amb_ref_inst...

.