you shoul either use ssh (id_rsa) or install ambari-agent on all hosts
after ambari agent is installed (change the /etc/ambari-agent/conf/ambari-agent.ini ) and set the hostname of ambari-server machine for all machines
then change the /etc/hosts file ( ip_of_machine1 name_of_machine1
ip_of_machine2 name_of_machine2....)
then ==> ambari-agent restart for all machines
trusted and tested