diff --git a/lib/jnpr/junos/utils/scp.py b/lib/jnpr/junos/utils/scp.py index d5a66dac9..de3816d12 100644 --- a/lib/jnpr/junos/utils/scp.py +++ b/lib/jnpr/junos/utils/scp.py @@ -90,7 +90,9 @@ def open(self, **scpargs): # through a jumphost. config = {} - kwargs = {} + sshargs = ('look_for_keys', 'allow_agent') + kwargs = {arg: scpargs.pop(arg) for arg in sshargs if scpargs.get(arg) is not None} + ssh_config = getattr(junos, '_sshconf_path') if ssh_config: config = paramiko.SSHConfig()