Skip to content

Commit

Permalink
fix(ssh-tunnel): add password to from_private_key function (#23175)
Browse files Browse the repository at this point in the history
(cherry picked from commit cb9bff7)
  • Loading branch information
hughhhh authored and eschutho committed Feb 28, 2023
1 parent e0a394f commit f5a5c26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/extensions/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f5a5c26

Please sign in to comment.