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

Failed to connect to the host via ssh: ssh #12

Closed johnnycash133 closed 5 years ago

johnnycash133 commented 5 years ago

TASK [Gathering Facts] ***** fatal: [<35.236.----->]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: Could not resolve hostname <35.236.----->: Name or service not known", "unreachable": true} to retry, use: --limit @/home/myaccount/wireguard_ansible/wireguard.retry

PLAY RECAP ***** <35.236.------> : ok=0 changed=0 unreachable=1 failed=0

I am using Google cloud platform with SSH Key

iamckn commented 5 years ago

Are you able to ssh to the server directly?

iamckn commented 5 years ago

Also noticed you're including <> as part of your IP address. Use the IP without them.

johnnycash133 commented 5 years ago

fatal: ]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '' (ECDSA) to the list of known hosts.\r\nroot@serverIP: Permission denied (publickey).", "unreachable": true}

and yes I made sure to remove the <>

iamckn commented 5 years ago

This is not a wireguard issue. It's your ssh connection to the server. Before trying to run this, ensure you can ssh to the server.