On 2/4/20 1:11 PM, anilkumar panditi wrote:
> Hi ,
> I am trying to connect to ec2 instance using .pem file in ansible.
> I am getting below error.
>
> fatal: [hdi_master1]: UNREACHABLE! => {
> "changed": false,
> "msg": "Failed to connect to the host via ssh: Permission denied
> (publickey,gssapi-keyex,gssapi-with-mic).",
> "unreachable": true
> }
>
> my inventory:
> ============
>
> # inventory of servers
>
> #ungrouped servers
> hdi_master1 ansible_host=13.234.186.61 ansible_connection=ssh
> ansible_user=centos --private-key=/home/centos/openshift.pem
>
> even though i am passing i am getting above error .can anyone help me please.
Your syntax in the inventory file is bogus, please try
ansible_ssh_private_key_file=/home/centos/openshift.pem
Regards
Racke
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
> [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/fb8ec1ed-2346-417b-b056-171d65418f1e%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/fb8ec1ed-2346-417b-b056-171d65418f1e%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/75c489f2-24d8-593c-f6a8-370cf4bf5490%40linuxia.de.
signature.asc
Description: OpenPGP digital signature
