{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/22745","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/22745/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/22745/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/22745/events","html_url":"https://github.com/ansible/ansible/issues/22745","id":215069416,"number":22745,"title":"Failed to connect to the host via ssh into ansible host","user":{"login":"sdixit0204","id":26489693,"avatar_url":"https://avatars3.githubusercontent.com/u/26489693?v=4","gravatar_id":"","url":"https://api.github.com/users/sdixit0204","html_url":"https://github.com/sdixit0204","followers_url":"https://api.github.com/users/sdixit0204/followers","following_url":"https://api.github.com/users/sdixit0204/following{/other_user}","gists_url":"https://api.github.com/users/sdixit0204/gists{/gist_id}","starred_url":"https://api.github.com/users/sdixit0204/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdixit0204/subscriptions","organizations_url":"https://api.github.com/users/sdixit0204/orgs","repos_url":"https://api.github.com/users/sdixit0204/repos","events_url":"https://api.github.com/users/sdixit0204/events{/privacy}","received_events_url":"https://api.github.com/users/sdixit0204/received_events","type":"User","site_admin":false},"labels":[{"id":562292166,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.4","name":"affects_2.4","color":"ededed","default":false},{"id":785271699,"url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":54811101,"url":"https://api.github.com/repos/ansible/ansible/labels/needs_info","name":"needs_info","color":"eb6420","default":false},{"id":636352796,"url":"https://api.github.com/repos/ansible/ansible/labels/support:core","name":"support:core","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":20,"created_at":"2017-03-17T17:21:18Z","updated_at":"2018-04-05T16:39:47Z","closed_at":"2018-03-17T19:51:07Z","author_association":"NONE","body":"##### ISSUE TYPE\nBug Report\n\n##### COMPONENT NAME\ncore\n\n##### ANSIBLE VERSION\n2.4.0\n\n##### CONFIGURATION\n\n\n##### OS / ENVIRONMENT\n\n\n##### SUMMARY\nI launched two RHEL ec2 instances. I am able to ssh into host server from central server using terminal ssh but when I try to run \"ansible -m ping 'server-name' \" command , I get the below error\"\r\n\r\n| UNREACHABLE! => {\r\n    \"changed\": false,\r\n    \"msg\": \"Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\\r\\n\",\r\n    \"unreachable\": true\r\n}\r\n\r\nsame private key is present in both host and central server.\r\n\r\nCan you assist?﻿\n\n##### STEPS TO REPRODUCE\n\n\n##### EXPECTED RESULTS\n\n\n##### ACTUAL RESULTS\n\n\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/378999355","html_url":"https://github.com/ansible/ansible/issues/22745#issuecomment-378999355","issue_url":"https://api.github.com/repos/ansible/ansible/issues/22745","id":378999355,"user":{"login":"magfuentes","id":19175096,"avatar_url":"https://avatars1.githubusercontent.com/u/19175096?v=4","gravatar_id":"","url":"https://api.github.com/users/magfuentes","html_url":"https://github.com/magfuentes","followers_url":"https://api.github.com/users/magfuentes/followers","following_url":"https://api.github.com/users/magfuentes/following{/other_user}","gists_url":"https://api.github.com/users/magfuentes/gists{/gist_id}","starred_url":"https://api.github.com/users/magfuentes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magfuentes/subscriptions","organizations_url":"https://api.github.com/users/magfuentes/orgs","repos_url":"https://api.github.com/users/magfuentes/repos","events_url":"https://api.github.com/users/magfuentes/events{/privacy}","received_events_url":"https://api.github.com/users/magfuentes/received_events","type":"User","site_admin":false},"created_at":"2018-04-05T16:39:47Z","updated_at":"2018-04-05T16:39:47Z","author_association":"NONE","body":"Thank you !!!\r\n\r\nFrom: \"J. Scott Johnson\" <notifications@github.com>\r\nReply-To: ansible/ansible <reply@reply.github.com>\r\nDate: Thursday, April 5, 2018 at 12:18\r\nTo: ansible/ansible <ansible@noreply.github.com>\r\nCc: Magda Fuentes <efuentes@juniper.net>, Mention <mention@noreply.github.com>\r\nSubject: Re: [ansible/ansible] Failed to connect to the host via ssh into ansible host (#22745)\r\n\r\n\r\nWhen I hit this I was using Ansible on OSX to connect to an aws box with a pem certificate. I did NOT have a ~/.ssh/config file. Once I created one and added no more than this:\r\n\r\nHost *\r\nIdentityFile ~/.ssh/id_rsa\r\nAddKeysToAgent yes\r\n\r\nThen I was magically able to execute playbooks.\r\n\r\n—\r\nYou are receiving this because you were mentioned.\r\nReply to this email directly, view it on GitHub<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ansible_ansible_issues_22745-23issuecomment-2D378992727&d=DwMFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=h-WxDbtRmbJnRJcTBr8iutcJnMOWakEVvMw7MeY01og&m=W_a6YjAlA3HvQl2cfnzrQm-1lfydv-KR6KCtS-JCx4A&s=-FF53gBESlMUa2HI8wdg1T8x0u7wYSW-NHn9xFZkaCk&e=>, or mute the thread<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ASSWuPdfv90ewWRTniTCOLdzS8i5cBvmks5tlkPqgaJpZM4Mg32d&d=DwMFaQ&c=HAkYuh63rsuhr6Scbfh0UjBXeMK-ndb3voDTXcWzoCI&r=h-WxDbtRmbJnRJcTBr8iutcJnMOWakEVvMw7MeY01og&m=W_a6YjAlA3HvQl2cfnzrQm-1lfydv-KR6KCtS-JCx4A&s=rI4ZUMcbCssD9f2pLpYzNyrsDShjILJjZUC2laEJrmo&e=>.\r\n"}}
{"actor":{"display_login":"magfuentes"}}