Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes. Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
647 B
Python
24 lines
647 B
Python
#!/usr/bin/env python3
|
|
import paramiko
|
|
|
|
HOST = "107.173.30.245"
|
|
USER = "root"
|
|
PASS = "Xiao4669805"
|
|
|
|
cmds = [
|
|
"nginx -V 2>&1 | head -1",
|
|
"ls -la /etc/nginx/ 2>/dev/null || echo NO_NGINX",
|
|
"ls -la /etc/nginx/conf.d/ 2>/dev/null || true",
|
|
"ls -la /etc/nginx/sites-available/ 2>/dev/null || true",
|
|
"cat /etc/nginx/nginx.conf 2>/dev/null | head -40",
|
|
]
|
|
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect(HOST, username=USER, password=PASS, timeout=20)
|
|
for c in cmds:
|
|
print(">", c)
|
|
_, stdout, _ = client.exec_command(c)
|
|
print(stdout.read().decode())
|
|
client.close()
|