iamckn / wireguard_ansible

Ansible scripts for the set up a typical wireguard VPN connection
https://www.ckn.io/blog/2017/11/14/wireguard-vpn-typical-setup/
322 stars 69 forks source link

Error #11

Closed joejoe2017 closed 5 years ago

joejoe2017 commented 5 years ago

I got this error when I run ansible-playbook wireguard.yml -u root -k -i hosts

fatal: [172.31.43.89]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey).", "unreachable": true} to retry, use: --limit @/home/ubuntu/wireguard_ansible/wireguard.retry

PLAY RECAP ***** 172.31.43.89 : ok=0 changed=0 unreachable=1 failed=0

I setup my hosts as

[all]

172.31.43.89 ansible_python_interpreter=/usr/bin/python

I run this on Amazon EC2 , ubuntu 14

iamckn commented 5 years ago

That's something wrong with your ssh connection. Ensure you can ssh into the server as root before running the playbook.