I am using this simple function, which works from a terminal, but it doesn't work from Django:
def validate_ssh_public_key(key_string):
"""validate ssh public key"""
try:
ssh = SSHKey(key_string)
except Exception as err:
print("Error running SSHKey:", err)
return False
try:
ssh.parse()
return True
except Exception as err:
print("Error running ssh.parse():", err)
return False
and I get this error:
Error running SSHKey: _SSHCipher() takes no arguments