Permission denied (publickey, gssapi-keyex, gssapi-with-mic, password) during amba hadoop installation

I am trying to deploy a hadoop cluster using ambari, but when I select the hostnames with the fully qualified domain name and proceed with the configuration, I get permission denied for ssh.

STEPS: 1. The generated rsa key using ssh-keygen as root.

  1. permission changed to .ssh (700) and authorized_keys (640)
  2. enter the public key in authorized_keys.
  3. and copied the public key to all hosts (authorized_keys) and changed the file permission as described above.
  4. I could ssh without a password from the ambari server server on all other hosts.

But from ambari, it was not possible to install hadoop with the error below.

SSH command execution finished host=XXX, exitcode=255 Command end time 2015-06-23 10:44:07 ERROR: Bootstrap of host XXX fails because previous action finished with non-zero exit code (255) ERROR MESSAGE: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). STDOUT: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). 

Please do not post this question as a duplicate. I could see other questions with the same description, but none of them mentioned the permission error for using ssh Ambari.

+6
source share
3 answers

I ran into the same problem with it.

ssh -i <your_keypair> root@ <your_host> I tried this, but it has not been resolved.

Here is my solution

host1 ip: 192.168.1.21

host2 ip: 192.168.1.22

host3 ip: 192.168.1.23

on host1:

 rm -rf /root/.ssh ssh-keygen -t dsa cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys scp /root/.ssh/id_dsa.pub host2:/root/ scp /root/.ssh/id_dsa.pub host3:/root/ 

on host2:

 rm -rf /root/.ssh ssh-keygen -t dsa cat /root/id_dsa.pub >> /root/.ssh/authorized_keys 

on host3:

 rm -rf /root/.ssh ssh-keygen -t dsa cat /root/id_dsa.pub >> /root/.ssh/authorized_keys 

host1: /root/.ssh/id_dsa This is the file you need.

+6
source

You should do something like

ssh -i <your_keypair> root@ <your_host>

from another host. If this does not work, you are using the wrong key pair.

+1
source

I had exactly the same message, but it turned out that the problem was a user error. I downloaded the public key to the Ambari installer, and not to the private key, as required.

0
source

Source: https://habr.com/ru/post/989636/


All Articles