diff --git a/panoply/constants.py b/panoply/constants.py index 2bf2379..a943147 100644 --- a/panoply/constants.py +++ b/panoply/constants.py @@ -1,2 +1,2 @@ -__version__ = "2.0.4" +__version__ = "2.0.5" __package_name__ = "panoply-python-sdk" diff --git a/panoply/ssh.py b/panoply/ssh.py index b4b11d6..1c843ac 100644 --- a/panoply/ssh.py +++ b/panoply/ssh.py @@ -2,7 +2,7 @@ Module for storing SSH related stuff """ from typing import Dict -from paramiko import RSAKey +from paramiko import RSAKey, Ed25519Key, SSHException from sshtunnel import SSHTunnelForwarder from io import StringIO @@ -132,7 +132,12 @@ def _get_server(self, platform_ssh: bool): if platform_ssh: return None - pkey = RSAKey.from_private_key(StringIO(self.tunnel["privateKey"])) + try: + pkey = RSAKey.from_private_key(StringIO(self.tunnel["privateKey"]), + password=self.tunnel.get("password")) + except SSHException: + pkey = Ed25519Key.from_private_key(StringIO(self.tunnel["privateKey"]), + password=self.tunnel.get("password")) server = SSHTunnelForwarder( ssh_address_or_host=(self.tunnel["host"], self.tunnel["port"]),