{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/awx/issues/5322","repository_url":"https://api.github.com/repos/ansible/awx","labels_url":"https://api.github.com/repos/ansible/awx/issues/5322/labels{/name}","comments_url":"https://api.github.com/repos/ansible/awx/issues/5322/comments","events_url":"https://api.github.com/repos/ansible/awx/issues/5322/events","html_url":"https://github.com/ansible/awx/issues/5322","id":522858611,"node_id":"MDU6SXNzdWU1MjI4NTg2MTE=","number":5322,"title":"Can't authenticate with pubkey to remote hosts","user":{"login":"AdrianDutu","id":4824201,"node_id":"MDQ6VXNlcjQ4MjQyMDE=","avatar_url":"https://avatars0.githubusercontent.com/u/4824201?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrianDutu","html_url":"https://github.com/AdrianDutu","followers_url":"https://api.github.com/users/AdrianDutu/followers","following_url":"https://api.github.com/users/AdrianDutu/following{/other_user}","gists_url":"https://api.github.com/users/AdrianDutu/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianDutu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianDutu/subscriptions","organizations_url":"https://api.github.com/users/AdrianDutu/orgs","repos_url":"https://api.github.com/users/AdrianDutu/repos","events_url":"https://api.github.com/users/AdrianDutu/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianDutu/received_events","type":"User","site_admin":false},"labels":[{"id":607283748,"node_id":"MDU6TGFiZWw2MDcyODM3NDg=","url":"https://api.github.com/repos/ansible/awx/labels/type:bug","name":"type:bug","color":"F79F81","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2019-11-14T13:27:46Z","updated_at":"2019-11-18T15:08:23Z","closed_at":null,"author_association":"NONE","body":"##### ISSUE TYPE\r\n - Bug Report\r\n- Feature Idea\r\n\r\n##### SUMMARY\r\nI have upgraded from 6.1.0 to 9.0.1. Now I can't authenticate to my remote hosts with a DSA key. After troubleshooting, I discovered that the ssh-client in the new awx-celery image was upgraded to 7.8 from 6.x. This version doesn't like DSA keys. I went inside the container and edited the ssh_config file and added:\r\n\r\n`Host *\r\nUser s.a.awx\r\nHostKeyAlgorithms +ssh-dss\r\nPubkeyAcceptedKeyTypes +ssh-dss`\r\n\r\nNow from the shell, I can ssh to my remote hosts. So I tried to add these to the ansible config file in the ssh_args variable.\r\n\r\n`ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o Host=* -o User=s.a.awx -o HostKeyAlrogithms=+ssh-dss -o PubkeyAcceptedTypes=+ssh-dss`\r\n\r\nThe problem is I'm not sure which ansible.cfg file I need to modify since there are a bunch. I tried:\r\n/etc/ansible/ansible.cfg\r\n/var/lib/awx/projects/_10__automation_ansible/ansible.cfg (_10_automation_ansible is my project name so I assumed this would be a cfg just for that project).\r\n\r\nIt didn't work. If I debug my job in awx I can't see that the args I've added are sent. This is what it sends:\r\n\r\n`SSH: EXEC ssh -vvv -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no -o Port=22 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User=\"s.a.awx\"' -o ConnectTimeout=10 -o ControlPath=/tmp/ansible-ssh-%h-%p-%r`\r\n\r\nWhere is the ansible.cfg file that I need to modify in order for this to work? \r\nAlso, please expose the ansible related configurations at installation because digging through the venvs in the container is pretty cumbersome as you can see. So the ansible.cfg and vault-pw files would be nice.\r\n\r\n##### ENVIRONMENT\r\n* AWX version: 9.0.1\r\n* AWX install method: kubernetes\r\n* Ansible version:  2.8.5\r\n* Operating System: CentOS7\r\n\r\n##### STEPS TO REPRODUCE\r\n\r\n1. Configure a Machine Type credential in AWX and use a DSA key\r\n2. Run any job that uses that credential on any host\r\n\r\n##### EXPECTED RESULTS\r\n\r\nConnection succeeding and running the play.\r\n\r\n##### ACTUAL RESULTS\r\n\r\nThe public key is refused during authentication.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/awx/issues/comments/555056177","html_url":"https://github.com/ansible/awx/issues/5322#issuecomment-555056177","issue_url":"https://api.github.com/repos/ansible/awx/issues/5322","id":555056177,"node_id":"MDEyOklzc3VlQ29tbWVudDU1NTA1NjE3Nw==","user":{"login":"ryanpetrello","id":214912,"node_id":"MDQ6VXNlcjIxNDkxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/214912?v=4","gravatar_id":"","url":"https://api.github.com/users/ryanpetrello","html_url":"https://github.com/ryanpetrello","followers_url":"https://api.github.com/users/ryanpetrello/followers","following_url":"https://api.github.com/users/ryanpetrello/following{/other_user}","gists_url":"https://api.github.com/users/ryanpetrello/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanpetrello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanpetrello/subscriptions","organizations_url":"https://api.github.com/users/ryanpetrello/orgs","repos_url":"https://api.github.com/users/ryanpetrello/repos","events_url":"https://api.github.com/users/ryanpetrello/events{/privacy}","received_events_url":"https://api.github.com/users/ryanpetrello/received_events","type":"User","site_admin":false},"created_at":"2019-11-18T15:08:23Z","updated_at":"2019-11-18T15:08:23Z","author_association":"CONTRIBUTOR","body":"AWX doesn't place SSH keys in `/var/lib/awx/.ssh/`.  When jobs are launched, they're pulled from the database and written to `ssh-agent`.\r\n\r\nIf you're seeing `No more authentication methods` I suspect you might have something misconfigured.\r\n\r\nCan you share `AWX_TASK_ENV` value at `/api/v2/settings/jobs/`?"}}
{"actor":{"display_login":"ryanpetrello"}}