13 lines
335 B
Plaintext
Executable File
13 lines
335 B
Plaintext
Executable File
#!/usr/bin/expect -f
|
|
set timeout 30
|
|
spawn ssh root@124.221.67.199
|
|
expect "password:"
|
|
send "Szgt888.\r"
|
|
expect "\\$"
|
|
# Use base64 to safely transfer the script content
|
|
set payload [exec base64 -i scripts/reload-nginx.sh]
|
|
send "echo '$payload' | base64 -d > /tmp/reload.sh && bash /tmp/reload.sh\r"
|
|
expect "\\$"
|
|
send "exit\r"
|
|
expect eof
|