Skip to content

Commit

Permalink
Lookup user from ~/.ssh/config
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 committed Dec 5, 2016
1 parent b84b8a6 commit 9d91b76
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 9d91b76

Please sign in to comment.