Update server.py
Browse files
server.py
CHANGED
|
@@ -103,8 +103,9 @@ def ssh():
|
|
| 103 |
subprocess.run("apt update", check=True, shell=True)
|
| 104 |
subprocess.run("apt install openssh-server -y", check=True, shell=True)
|
| 105 |
subprocess.run("apt-get install vim -y", check=True, shell=True)
|
|
|
|
| 106 |
config_client_cmd = "sudo sed -i '/PasswordAuthentication/s/^#//g' /etc/ssh/ssh_config"
|
| 107 |
-
|
| 108 |
config_server_cmd = "sudo sed -i '/PermitRootLogin prohibit-password/s/prohibit-password/yes/' /etc/ssh/sshd_config"
|
| 109 |
run_command(config_server_cmd)
|
| 110 |
run_command("systemctl restart ssh")
|
|
|
|
| 103 |
subprocess.run("apt update", check=True, shell=True)
|
| 104 |
subprocess.run("apt install openssh-server -y", check=True, shell=True)
|
| 105 |
subprocess.run("apt-get install vim -y", check=True, shell=True)
|
| 106 |
+
|
| 107 |
config_client_cmd = "sudo sed -i '/PasswordAuthentication/s/^#//g' /etc/ssh/ssh_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 |
run_command(config_server_cmd)
|
| 111 |
run_command("systemctl restart ssh")
|