I got below error mes while try to registered host in ambari 2.2
i have install ssh and copy the ssh private key in Host Registration Information
i have copy the public key to >> authorized_key
cat /root/.ssh/id_rsa.pub >>authorized_keys
chmod 700 -R /root/.ssh
chmod 600 /root/.ssh/authorized_keys
Creating target directory... ========================== Command start time 2017-01-31 11:03:04 Permission denied (publickey,password). SSH command execution finished host=ubuntu, exitcode=255 Command end time 2017-01-31 11:03:04 ERROR: Bootstrap of host ubuntu fails because previous action finished with non-zero exit code (255) ERROR MESSAGE: Permission denied (publickey,password). STDOUT: Permission denied (publickey,password).
Here it would be best to run the following commands and then verify whether you are able to do Password less ssh without any issue.
Run the following command from ambari-server host:
ssh-copy-id -i /root/.ssh/id_rsa.pub localhost ssh-copy-id -i /root/.ssh/id_rsa.pub agenthost1.example.com ssh-copy-id -i /root/.ssh/id_rsa.pub agenthost1.example.com ssh-copy-id -i /root/.ssh/id_rsa.pub agenthost1.example.com ssh-copy-id -i /root/.ssh/id_rsa.pub agenthost1.example.com
1. Can you please share the "/etc/ssh/sshd_config" file content here ?
2. Checking the "PasswordAuthentication" and "ChallengeResponseAuthentication" will be good.
3. Is your ambari running as "root" user or some other user?
- A Quick Workaround will be to install the Agent Manually as :
Delete the .ssh file. And create key again, dont change the permission of folder and create authorized_keys file inside and add public key. Then try to reinstall again.
Also please check your hostname and /etc/hosts file, check iptable and selinux.
Not yet it is resolved, i was stuck here, i have try all possibilities
1) i have deleted the .ssh file and created again
2) i have disable the iptable
3) i have selinux is disable(not installed)
is there any other option to install with ssh or any suggestion ?
Please check your /etc/hosts file. As well as ntp and permission of .ssh folder and all files which is under the .ssh.
One query are you installing the hdp with root user?
I noticed in your snippet above chmod 700 -R /root/.ssh instead of
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
Is your installation a single or multi node if the later then you MUST copy the authorized_keys form the Ambari host aka Management server to the other nodes in the /root/.ssh/ directory, It seems you are on Ubuntu please find the correct syntax.