Support Questions

Find answers, ask questions, and share your expertise

ERROR MESSAGE: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)

avatar

Hi Team,

I am installing 15node cluster with HDP 2.4 and unable to proceed with below error:

========================== Creating target directory... ==========================

Command start time 2016-11-21 12:12:42

Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). SSH command execution finished host=xxx, exitcode=255 Command end time 2016-11-21 12:12:42

ERROR: Bootstrap of host hdpmaster01.supermoon.com fails because previous action finished with non-zero exit code (255) ERROR MESSAGE: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

I followed below steps:

  1. Generate public and private SSH keys on the Ambari Server host.

    ssh-keygen

  2. Copy the SSH Public Key (id_rsa.pub) to the root account on your target hosts.

    .ssh/id_rsa

    .ssh/id_rsa.pub

  3. Add the SSH Public Key to the authorized_keys file on your target hosts.

    cat id_rsa.pub >> authorized_keys

  4. Depending on your version of SSH, you may need to set permissions on the .ssh directory (to 700) and the authorized_keys file in that directory (to 600) on the target hosts.

    chmod 700 ~/.ssh

    chmod 600 ~/.ssh/authorized_keys

  5. copy authorizedkeys files to all hosts

  6. ssh is working without password.

  7. selinux is disabled and firewall is off on all nodes and my /etc/hosts file first two lines shows:

  8. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

Please help me in resolving issue.

Sridhar

14 REPLIES 14

avatar

drwx------ root root ? . dr-xr-x---. root root system_u:object_r:admin_home_t:s0 .. -rw------- root root ? authorized_keys -rw------- root root ? id_rsa -rw-r--r-- root root ? id_rsa.pub -rw-r--r-- root root ? known_hosts

avatar
Super Guru

@Sridhar M

This is the last thing I can suggest which I don't think should make a difference if your ssh works from putty/ssh terminal. Change permissions on "id_rsa" to 400. It is currently set at 600 which should be okay. The other thing is the host names you are providing in ambari should be same as in your known_hosts file. Otherwise, delete known_hosts file on ambari node, connect to all other nodes using the exact same name that you are using in Ambari. It will ask you to confirm that you trust this host and will ask you to add to known host file. Say yes, and then try again. If it still doesn't work, please share your ambari screen where you are specifying host names and ssh key and user name (root).

avatar

Hi Quereshi,

My /etc/host file is like this:

192.168.49.121 HDPMaster.example.com HDPMaster where are ambari retrieves as hdpmaster.example.com.Is this is some thing obstructing to go further.

sridhar

avatar
Super Guru

if you are able to ssh without password, your /etc/hosts file shouldn't matter. I am assuming it is working because like you said, you are able to ssh without password.

avatar
@Sridhar M

Check your known_hosts file to match the case for the hosts. Also, check ssh to and from all the hosts.

What does hostname -f return?