ansiblecygwinpageant

How to configure ansible under cygwin to use pageant (running ansible with password protected key)


I want to use a password protected ppk file to access my servers via ansible. I've loaded the key using pageant I'm trying to run a simple ansible command but it fails.

1.1.1.1 | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host via ssh: Host key verification failed.", "unreachable": true }

How can I make sure ansible uses the key ?

My ansible is running inside cygwin terminal running on windows 10. I think that the cygwin can't see the pageant running on the win 10 host.


Solution

  • ppk keys needs to be transformed using puttygen to OpenSSH key Than - you need to use ssh-agent bash ssh-add ./ssh_key

    and than, ansible will work with that key.