Reputation: 1138
I have been trying to use Ansible over AWS.
I am using ppk file to login to AWS. I want to use the same with Ansible.
This ppk file was extracted from pem file which i got from AWS.
This is the command i am using.
ansible all -m ping -u ubuntu --private-key /opt/keys/privateKey.ppk
I get the following
Enter passphrase for key '/opt/keys/privateKey.ppk
172.31.50.XX | FAILED => SSH Error: Permission denied (publickey).
while connecting to 172.31.50.XX:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
I did not create the keys with a passphase so not sure why I am getting this error
Upvotes: 1
Views: 554
Reputation: 56997
Ansible uses OpenSSH under the covers so you'll need to use the original pem file that AWS generated for you.
Upvotes: 2