Fix in rsa
This commit is contained in:
parent
f35f04b2c0
commit
96316454c2
2 changed files with 16 additions and 1 deletions
|
|
@ -128,7 +128,10 @@ class Task:
|
|||
|
||||
rsa=None
|
||||
if self.private_key!='':
|
||||
rsa=paramiko.RSAKey.from_private_key_file(self.private_key, self.password_key)
|
||||
try:
|
||||
rsa=paramiko.RSAKey.from_private_key_file(self.private_key, self.password_key)
|
||||
except paramiko.ssh_exception.SSHException:
|
||||
rsa=paramiko.Ed25519Key.from_private_key_file(self.private_key, self.password_key)
|
||||
|
||||
if check_ssh_host.lookup(self.server)==None:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue