dodanie kluczy ssh
This commit is contained in:
parent
42acfa57e3
commit
6888472940
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,4 +2,5 @@
|
||||
/venv
|
||||
/configs/squash
|
||||
/squash
|
||||
/keys
|
||||
|
||||
|
10
utils.py
10
utils.py
@ -39,7 +39,15 @@ def ping_client(ip):
|
||||
|
||||
|
||||
def ssh_thread_function():
|
||||
subprocess.run(['wssh', '--fbidhttp=False', '--port='+config.webssh_port])
|
||||
try:
|
||||
os.mkdir(os.path.join(os.getcwd(), 'keys'))
|
||||
except:
|
||||
pass
|
||||
if os.path.exists(os.path.join(os.getcwd(), 'keys', "sshkey")) is False:
|
||||
subprocess.run(['ssh-keygen ', '-t rsa ', '-f key', '-q', '-P ""'])
|
||||
|
||||
subprocess.run(['wssh', '--fbidhttp=False', '--port='+config.webssh_port,
|
||||
'--hostfile='+os.path.join(os.getcwd(), 'keys', "sshkey")])
|
||||
|
||||
|
||||
def check_allocation_thread_function():
|
||||
|
Loading…
Reference in New Issue
Block a user