Skip to content

Commit

Permalink
fix(ssh-tunnel): add password to from_private_key function (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hughhhh authored Feb 25, 2023
1 parent 196e3ea commit cb9bff7
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 cb9bff7

Please sign in to comment.