From 44a49d3d6161d6d56af3294d06ffe35bfe75b625 Mon Sep 17 00:00:00 2001 From: Jacob McGill Date: Sun, 7 Oct 2018 12:07:05 -0400 Subject: [PATCH] Allow SCP to support 'look_for_keys' and 'allow_agent' arguments to connect method --- lib/jnpr/junos/utils/scp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/jnpr/junos/utils/scp.py b/lib/jnpr/junos/utils/scp.py index 52dabab29..a879fc89b 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()