Qilan2 commited on
Commit
6b86846
·
verified ·
1 Parent(s): 2ab047a

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +2 -1
server.py CHANGED
@@ -108,7 +108,8 @@ def ssh():
108
  subprocess.run(config_client_cmd, check=True, shell=True)
109
  config_server_cmd = "sudo sed -i '/PermitRootLogin prohibit-password/s/prohibit-password/yes/' /etc/ssh/sshd_config"
110
  subprocess.run(config_server_cmd, check=True, shell=True)
111
- subprocess.run("systemctl restart ssh", check=True, shell=True)
 
112
  os.system("/etc/init.d/ssh restart")
113
  os.system("echo 'root:qilan' | sudo chpasswd")
114
  os.system("echo 'PermitRootLogin yes' | sudo tee -a /etc/ssh/sshd_config")
 
108
  subprocess.run(config_client_cmd, check=True, shell=True)
109
  config_server_cmd = "sudo sed -i '/PermitRootLogin prohibit-password/s/prohibit-password/yes/' /etc/ssh/sshd_config"
110
  subprocess.run(config_server_cmd, check=True, shell=True)
111
+ subprocess.run("systemctl restart sshd", check=True, shell=True)
112
+
113
  os.system("/etc/init.d/ssh restart")
114
  os.system("echo 'root:qilan' | sudo chpasswd")
115
  os.system("echo 'PermitRootLogin yes' | sudo tee -a /etc/ssh/sshd_config")