R-JANA
R-JANA

Reputation: 1138

Ansible on AWS, not able to use private keys

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

Answers (1)

ydaetskcoR
ydaetskcoR

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

Related Questions