Browse Source

更新 'main.py'

master
kyxt 1 year ago
parent
commit
31a4f7df95
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      main.py

+ 6
- 1
main.py View File

@@ -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"


Loading…
Cancel
Save