diff --git a/apps/common/utils/encode.py b/apps/common/utils/encode.py index cd130e7fe..dc68c9ba8 100644 --- a/apps/common/utils/encode.py +++ b/apps/common/utils/encode.py @@ -75,11 +75,16 @@ def ssh_key_string_to_obj(text, password=None): key = paramiko.RSAKey.from_private_key(StringIO(text), password=password) except paramiko.SSHException: pass + else: + return key try: key = paramiko.DSSKey.from_private_key(StringIO(text), password=password) except paramiko.SSHException: pass + else: + return key + return key