Commit ebc1b497 authored by ibuler's avatar ibuler

[Update] 自动生成秘钥去掉密码

parent 2da87151
...@@ -112,7 +112,7 @@ class AssetUser(models.Model): ...@@ -112,7 +112,7 @@ class AssetUser(models.Model):
def auto_gen_auth(self): def auto_gen_auth(self):
password = str(uuid.uuid4()) password = str(uuid.uuid4())
private_key, public_key = ssh_key_gen( private_key, public_key = ssh_key_gen(
username=self.username, password=password username=self.username
) )
self.set_auth(password=password, self.set_auth(password=password,
private_key=private_key, private_key=private_key,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment