mirror of https://github.com/jumpserver/jumpserver
fix id_dsa check error
parent
dd6c82b168
commit
b36b702705
|
@ -180,15 +180,14 @@ def timesince(dt, since='', default="just now"):
|
|||
|
||||
|
||||
def ssh_key_string_to_obj(text):
|
||||
key_f = StringIO(text)
|
||||
key = None
|
||||
try:
|
||||
key = paramiko.RSAKey.from_private_key(key_f)
|
||||
key = paramiko.RSAKey.from_private_key( StringIO(text) )
|
||||
except paramiko.SSHException:
|
||||
pass
|
||||
|
||||
try:
|
||||
key = paramiko.DSSKey.from_private_key(key_f)
|
||||
key = paramiko.DSSKey.from_private_key( StringIO(text) )
|
||||
except paramiko.SSHException:
|
||||
pass
|
||||
return key
|
||||
|
@ -375,4 +374,4 @@ def sum_capacity(cap_list):
|
|||
return capacity_convert(total, expect='auto')
|
||||
|
||||
|
||||
signer = Signer()
|
||||
signer = Signer()
|
||||
|
|
Loading…
Reference in New Issue