comment DSSKey and add ed25519
This commit is contained in:
parent
82ca9dfa35
commit
d079b542be
@ -60,7 +60,8 @@ class backup_mysql(backup_generic):
|
||||
try:
|
||||
mykey = paramiko.RSAKey.from_private_key_file(self.private_key)
|
||||
except paramiko.SSHException:
|
||||
mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
#mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
mykey = paramiko.Ed25519Key.from_private_key_file(self.private_key)
|
||||
|
||||
self.ssh = paramiko.SSHClient()
|
||||
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
|
@ -49,7 +49,8 @@ class backup_oracle(backup_generic):
|
||||
try:
|
||||
mykey = paramiko.RSAKey.from_private_key_file(self.private_key)
|
||||
except paramiko.SSHException:
|
||||
mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
#mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
mykey = paramiko.Ed25519Key.from_private_key_file(self.private_key)
|
||||
|
||||
self.ssh = paramiko.SSHClient()
|
||||
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
|
@ -53,7 +53,8 @@ class backup_pgsql(backup_generic):
|
||||
try:
|
||||
mykey = paramiko.RSAKey.from_private_key_file(self.private_key)
|
||||
except paramiko.SSHException:
|
||||
mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
#mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
mykey = paramiko.Ed25519Key.from_private_key_file(self.private_key)
|
||||
|
||||
self.logger.debug('[%s] Trying to connect to "%s" with username root and key "%s"',self.backup_name,self.server_name,self.private_key)
|
||||
self.ssh = paramiko.SSHClient()
|
||||
|
@ -55,7 +55,8 @@ class backup_samba4(backup_generic):
|
||||
try:
|
||||
mykey = paramiko.RSAKey.from_private_key_file(self.private_key)
|
||||
except paramiko.SSHException:
|
||||
mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
#mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
mykey = paramiko.Ed25519Key.from_private_key_file(self.private_key)
|
||||
|
||||
self.ssh = paramiko.SSHClient()
|
||||
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
|
@ -55,7 +55,8 @@ class backup_sqlserver(backup_generic):
|
||||
try:
|
||||
mykey = paramiko.RSAKey.from_private_key_file(self.private_key)
|
||||
except paramiko.SSHException:
|
||||
mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
#mykey = paramiko.DSSKey.from_private_key_file(self.private_key)
|
||||
mykey = paramiko.Ed25519Key.from_private_key_file(self.private_key)
|
||||
|
||||
self.logger.debug('[%s] Connecting to %s with user root and key %s',self.backup_name,self.server_name,self.private_key)
|
||||
ssh = paramiko.SSHClient()
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user