-
This commit is contained in:
parent
b101ca953b
commit
8014febdbd
2
utils.py
2
utils.py
@ -51,7 +51,7 @@ def ssh_thread_function():
|
|||||||
# print(process.args)
|
# print(process.args)
|
||||||
key = RSA.generate(3072)
|
key = RSA.generate(3072)
|
||||||
with open(os.path.join(os.getcwd(), 'keys', "sshkey"), 'wb') as content_file:
|
with open(os.path.join(os.getcwd(), 'keys', "sshkey"), 'wb') as content_file:
|
||||||
chmod(os.path.join(os.getcwd(), 'keys', "sshkey"), 0600)
|
chmod(os.path.join(os.getcwd(), 'keys', "sshkey"), 0o600)
|
||||||
content_file.write(key.exportKey('PEM'))
|
content_file.write(key.exportKey('PEM'))
|
||||||
pubkey = key.publickey()
|
pubkey = key.publickey()
|
||||||
with open(os.path.join(os.getcwd(), 'keys', "sshkey.pub"), 'wb') as content_file:
|
with open(os.path.join(os.getcwd(), 'keys', "sshkey.pub"), 'wb') as content_file:
|
||||||
|
Loading…
Reference in New Issue
Block a user