diff --git a/lib/jnpr/junos/device.py b/lib/jnpr/junos/device.py index 26138722b..b3ff6dfec 100644 --- a/lib/jnpr/junos/device.py +++ b/lib/jnpr/junos/device.py @@ -218,7 +218,6 @@ def _sshconf_lkup(self): self._hostname = found.get('hostname', self._hostname) self._port = found.get('port', self._port) self._conf_auth_user = found.get('user') - self._conf_ssh_private_key_file = found.get('identityfile') return sshconf_path def display_xml_rpc(self, command, format='xml'): @@ -830,15 +829,13 @@ def __init__(self, *vargs, **kvargs): # user will default to $USER self._auth_user = os.getenv('USER') self._conf_auth_user = None - 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 - self._ssh_private_key_file = kvargs.get('ssh_private_key_file') \ - or self._conf_ssh_private_key_file + self._ssh_private_key_file = kvargs.get('ssh_private_key_file') self._auth_password = kvargs.get( 'password') or kvargs.get('passwd')