#!/bin/bash SERVER_IP="47.253.147.187" SERVER_USER="root" SERVER_PASS="5H0FuZ:2s0q)Lx" # 使用 expect 自动登录并执行检查命令 /usr/bin/expect </dev/null\r" send "exit\r" expect eof EOF