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:
|
||||
|
||||
|
|
|
|||
|
|
@ -399,3 +399,15 @@ class TaskDone(WebModel):
|
|||
super().__init__(connection)
|
||||
self.register(corefields.CharField('name_task'), True)
|
||||
self.register(LonelyIpField('ip'), True)
|
||||
|
||||
# For create task dinamically from database
|
||||
|
||||
class TaskDb(WebModel):
|
||||
|
||||
def __init__(self, connection):
|
||||
|
||||
super().__init__(connection)
|
||||
self.register(corefields.CharField('name'), True)
|
||||
self.register(corefields.CharField('path', 4096), True)
|
||||
self.fields['path'].unique=True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue