I assume you have installed the Ambari server and are now trying to install HDP 2.2 w/ public private key?
The Ambari server needs a working public/private SSH key to be able to connect to the host and install the agents. It looks like this it what you are trying to achieve, but you’re SSH key setup is not correct.
Please check the points below:
1) Make sure your local public key is in the authorized_keys file on the remote machine
2) Ensure your permissions are for the current user only in the home and .ssh directories (ie 700 or 644)
3) Ensure your sshd config allows key authentication
For details look here under “Set up Password-less SSH”: http://dev.hortonworks.com.s3.amazonaws.com/HDPDocuments/AMBARI_DOC_SUITE/index.html#Item2.5
There is a second way to install HDP w/ Ambari. You install the Ambari agent first (for example yum install ambari-agent) and point them to Amabri server by setting in the /etc/ambari-agent/conf/ambari-agent.ini the following:
hostname=AMABRI_SERVER_HOSTNAME
restart/start agent
Please find Ambari documentation here: http://docs.hortonworks.com/HDPDocuments/Ambari-1.7.0.0/index.html