fix: 前端类型修复(@types/node + vite-env.d.ts + ufw SSHD_PORT)

- frontend: 加 @types/node / vite/client 类型声明
- frontend: tsconfig 加 types: [node, vite/client]
- scripts: deploy_remote.sh 用 sg docker + dc() 函数避免引号问题
- scripts: deploy_remote.sh ufw 改用 \ 变量
This commit is contained in:
Mavis
2026-06-07 23:04:06 +08:00
parent 60b062daf2
commit 427e1f5cf2
9 changed files with 370 additions and 0 deletions

16
scripts/_check_sshd.py Normal file
View File

@@ -0,0 +1,16 @@
import os, sys, paramiko
PW = os.environ.get("REMOTE_PASS", "")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
c.connect("207.57.129.228", port=19717, username="root", password=PW, timeout=15, allow_agent=False, look_for_keys=False)
def run(cmd):
si, so, se = c.exec_command(cmd, timeout=15)
out = so.read().decode("utf-8", "replace")
err = se.read().decode("utf-8", "replace")
print(f"$ {cmd}")
if out: print(out, end="")
if err: print("[err]", err, end="", file=sys.stderr)
run("ls -la /root/.ssh/ && echo --- && cat /root/.ssh/authorized_keys | head -1 | cut -c1-100")
run("sshd -T 2>/dev/null | grep -iE 'pubkeyauth|permitroot|authentic' | head -20")
run("grep -E 'PubkeyAuthentication|PermitRootLogin|PasswordAuthentication|AuthorizedKeysFile' /etc/ssh/sshd_config 2>/dev/null; echo --- && ls -la /etc/ssh/sshd_config.d/ 2>/dev/null")
c.close()