comment DSSKey and add ed25519

This commit is contained in:
Kévin Guérineau
2020-11-20 14:13:27 +01:00
committed by Denis Cardon
parent 82ca9dfa35
commit d079b542be
6 changed files with 45 additions and 39 deletions
+2 -1
View File
@@ -476,7 +476,8 @@ def ssh_exec(command,ssh=None,server_name='',remote_user='',private_key='',ssh_p
try:
mykey = paramiko.RSAKey.from_private_key_file(private_key)
except paramiko.SSHException:
mykey = paramiko.DSSKey.from_private_key_file(private_key)
#mykey = paramiko.DSSKey.from_private_key_file(private_key)
mykey = paramiko.Ed25519Key.from_private_key_file(self.private_key)
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())