From 9d91b768b6fa91b91e821aa7a1e933481faa0c97 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Mon, 21 Nov 2016 15:33:50 +0100 Subject: [PATCH] Lookup user from ~/.ssh/config Due to a change in commit b03e611ef4eb, 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. --- lib/jnpr/junos/device.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/jnpr/junos/device.py b/lib/jnpr/junos/device.py index 3986015e7..26138722b 100644 --- a/lib/jnpr/junos/device.py +++ b/lib/jnpr/junos/device.py @@ -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