I have tried everything and i have been on this for two days, no progress.

i can access the same server (hadoopmaster) but when i try to copy the key or ssh into the slave (hadoopslave-1) i get the permission denied (publickey) error. Am here to get help.

Because i want to make them to be able to ssh into each other one namenode and two datanodes , i have already installed ambari and trying to setup on ambari on the cluster. First image screenshot

Second image screenshot

i used ssh -i ~/.ssh/id_rsa -v ubuntu@ec2-54-186-26-168.us-west-2.compute.amazonaws.com

Also tried to copy key but same error message ssh-copy-id -i $HOME/.ssh/id_rsa.pub ubuntu@hadoopslave-1

marked as duplicate by EEAA linux Jul 27 '16 at 19:37

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Let me just confirm the situation and my assumptions:

You have set a key for each instance in the AWS panel

You can ssh into hadoopmaster

From hadoopmaster you cannot ssh to hadoopslave-01 (because of permission denied public key error)

To me this sounds a lot like the key for the second instance is not locally available on the first instance.

The expected key may not be there and it defaults to using the local id_rsa

The expected key may have incorrect or insecure permissions (though i think there is warning for that)

The username may not be correct.

Note: If you cannot ssh in you will not be able to ssh-copy-id

  • what do i do be able to ssh in, i will copy the key to the hadoopsalve-1 but what location do i place the key. – devtolu Jul 27 '16 at 17:11
  • The key that is ALREADY assigned to access hadoopsalve-1 needs to be present on hadoopmaster . You stated you are trying to access from hadoopmaster.... so you will need the key for hadoopsalve-1 to be present when you try to use it. – cormpadre Jul 28 '16 at 10:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.