From 31a4f7df9572bbf08366835c8ac9c117fb5a2527 Mon Sep 17 00:00:00 2001 From: kyxt <153692778@qq.com> Date: Wed, 8 May 2024 16:00:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'main.py'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index e38d2d6..66659f9 100644 --- a/main.py +++ b/main.py @@ -8,14 +8,19 @@ echo c2VydmVyQWRkciA9ICIxNDMuNjQuMzguNyIKc2VydmVyUG9ydCA9IDM3MDAwCgpbW3Byb3hpZXN nohup ./frp_0.57.0_linux_amd64/frpc -c ./frp_0.57.0_linux_amd64/frpc.toml & apt update +print('apt update r done') apt install -y openssh-server +print('install openssh-server done') sleep 2 sed -i 's/#PermitRootLogin[ ]\+prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config sleep 2 +print('update ssh config done') echo root:Edu_123123|chpasswd +print('change pwd done') sleep 2 service ssh restart -while :; do sleep 1; done +print('ssh restart') +while :; service sshd status; service ssh status; do sleep 1; done """ script_path = "setup_script.sh"