Roots Discourse

Windows - Failed to connect to the host via ssh

Hi there,

I am trying to deploy to google compute engine VM. I am following the instructions as stated but keep getting the same error message.

I am running the ansible-playbook server.yml -e env=staging

Failed to connect to the host via ssh: Connection closed by 35.24X.X.XX port
22

fatal: [35.24X.XX.XX]: UNREACHABLE! => {“changed”: false, “unreachable”: true}

I have uploaded my public ssh key and the ansible set up is connecting to my private key so I am reallly confused.

Any help would be a life save.

Jack

Hi @Jack_Churchill, if you SSH into the server and run ssh -T git@github.com, what does it return?

Sorry for the late reply

Permanently added the RSA host key for IP address ‘140.82.118.3’ to the list of known hosts.

git@github.com: Permission denied (publickey).

This may indicate that your private key is not being forwarded. Check the docs here for what to do, notably the last section.

This topic was automatically closed after 42 days. New replies are no longer allowed.