ajoo Posted March 17, 2020 Share Posted March 17, 2020 Hi, I have been trying to automate the setting up od ssh keys on host machines using ansible. I have setup a master and test machine using vagrant on centos7. It automatically creates the vagrant user on both machines with sudo rights. Now I do not wish to manually copy the public key from the master to the node machine. I would rather have ansible do it. It always gives the following error: Quote TASK [Gathering Facts] *************************************************************************************************************** fatal: [web01]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n", "unreachable": true} to retry, use: --limit @/vagrant/playbook.retry My sshd_config has PasswordAuthentication = yes. Yet it does not ask for the password. If I try and ssh into the server directly from the terminal i get the following error : Quote Permission denied (publickey,gssapi-keyex,gssapi-with-mic). and again it does not ask for the password. Looking for any suggestion and stuff I can try. Thanks all ! Quote Link to comment https://forums.phpfreaks.com/topic/310311-ansible-automation-unable-to-automate-setting-up-ssh-keys-on-hosts/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.