This commit is contained in:
Mateusz779 2023-04-25 10:08:26 +02:00
parent affc2275e4
commit 473e0c6bc0

View File

@ -43,6 +43,7 @@ def ssh_thread_function():
os.mkdir(os.path.join(os.getcwd(), 'keys')) os.mkdir(os.path.join(os.getcwd(), 'keys'))
except: except:
pass pass
print(os.path.exists(os.path.join(os.getcwd(), 'keys', "sshkey")))
if os.path.exists(os.path.join(os.getcwd(), 'keys', "sshkey")) is False: if os.path.exists(os.path.join(os.getcwd(), 'keys', "sshkey")) is False:
print(os.path.join(os.getcwd(), 'keys', "sshkey")) print(os.path.join(os.getcwd(), 'keys', "sshkey"))
subprocess.run(['ssh-keygen', '-t rsa ', '-f '+os.path.join(os.getcwd(), 'keys', "sshkey"), '-P ""']) subprocess.run(['ssh-keygen', '-t rsa ', '-f '+os.path.join(os.getcwd(), 'keys', "sshkey"), '-P ""'])