From 54ca85fbc632bf6fa0b69a77fb78d332253dd870 Mon Sep 17 00:00:00 2001 From: "Hugh A. Miles II" Date: Fri, 24 Feb 2023 16:05:37 -0800 Subject: [PATCH] fix(ssh-tunnel): add password to `from_private_key` function (#23175) (cherry picked from commit cb9bff72d69bc1d3e08a3ecaa4f399961a2f566a) --- superset/extensions/ssh.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/superset/extensions/ssh.py b/superset/extensions/ssh.py index 885732d6bec2f..8fb235618c779 100644 --- a/superset/extensions/ssh.py +++ b/superset/extensions/ssh.py @@ -61,9 +61,10 @@ def create_tunnel( params["ssh_password"] = ssh_tunnel.password elif ssh_tunnel.private_key: private_key_file = StringIO(ssh_tunnel.private_key) - private_key = RSAKey.from_private_key(private_key_file) + private_key = RSAKey.from_private_key( + private_key_file, ssh_tunnel.private_key_password + ) params["ssh_pkey"] = private_key - params["ssh_private_key_password"] = ssh_tunnel.private_key_password return open_tunnel(**params)