Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password protected network ssh credentials don't work #2150

Closed
chrismeyersfsu opened this issue Aug 7, 2018 · 3 comments
Closed

Password protected network ssh credentials don't work #2150

chrismeyersfsu opened this issue Aug 7, 2018 · 3 comments

Comments

@chrismeyersfsu
Copy link
Member

chrismeyersfsu commented Aug 7, 2018

ISSUE TYPE
  • Bug Report
COMPONENT NAME
  • API
SUMMARY
STEPS TO REPRODUCE

We are going to use a network credential as if it was a machine credential. Network module usage looks like:

  - name: Retrieving full config from devices
    juniper_junos_config:
      host: '{{ inventory_hostname }}'
      user: 'netscript'
      ssh_private_key_file: '~/.ssh/test_key'
      port: 830
      timeout: 300
      format: text
      return_output: false
      retrieve: committed
      dest_dir: "output/"
EXPECTED RESULTS
  • Playbook to succeed
ACTUAL RESULTS
  • Job fails when it runs it's first task, gathering facts
ADDITIONAL INFORMATION

For password protected network credentials, (1) we aren't telling pexpect to "fill in the password". Job templates can't, effectively, use two password protected ssh keys and (2) we aren't protecting the user from assigning a network cred and machine cred with this case.

TASK [Gathering Facts] *********************************************************
Enter passphrase for key '/tmp/awx_479_KUdnKp/tmpwplXmU': 
fatal: [cmeyershost]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).\r\n", "unreachable": true}
@ryanpetrello
Copy link
Contributor

@chrismeyersfsu this ready to close?

@chrismeyersfsu
Copy link
Member Author

chrismeyersfsu commented Aug 14, 2018

@ryanpetrello I'm still shameless poking Daniel on the mailing list to see if this fix works for him. Our QE team tested the fix and passed. https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/awx-project/ce95ooS2sp0/OwEzOmwcDgAJ

@ryanpetrello
Copy link
Contributor

Okay, sounds good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants