Skip to content

Commit

Permalink
Lookup user from ~/.ssh/config (#628)
Browse files Browse the repository at this point in the history
Due to a change in commit b03e611, the user wasn't extracted from
user (or specified) SSH configuration. Add back the call to parse SSH
configuration.

Also, don't use the parsed private keyfile as it will be done
automatically by the underlying Paramiko. Using the parsed key doesn't
work, either because this is a list and not a string or because it is
encrypted and I am using an agent.
  • Loading branch information
vincentbernat authored and stacywsmith committed Dec 5, 2016
1 parent 6b9faac commit 03051ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/jnpr/junos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@ def __init__(self, *vargs, **kvargs):
self._conf_ssh_private_key_file = None
# user can get updated by ssh_config
self._ssh_config = kvargs.get('ssh_config')
self._sshconf_lkup()
# but if user or private key is explicit from call, then use it.
self._auth_user = kvargs.get('user') or self._conf_auth_user or \
self._auth_user
Expand Down

0 comments on commit 03051ab

Please sign in to comment.