360 Secure SkillHub
360 安全技能中心

VPS Command Runner

该 Skill 提供三个 Shell 脚本,通过 SSH 在清单中的多台 VPS 上同时或针对指定主机执行命令,用于查看容器状态、检查服务、拉取镜像与部署更新;默认使用用户名密码认证,也可改为 SSH 密钥,主机清单与凭据需自行在脚本中填写。

chmikiro
chmikiro
热度 59.91
最近更新 2026-05-18 12:18:30
分类:自动化依赖:代码执行 / 读写文件应用场景:DevOps / 自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add vps-command-runner
Metadata
name
vps-command-runner
description
Run commands across multiple VPS simultaneously. Execute SSH commands, deploy updates, check logs, and manage services across all your servers from one place. Use when managing multiple VPS, running commands across all hosts, checking status of distributed services, or deploying changes to multiple servers.

VPS Command Runner

Execute commands across your VPS fleet simultaneously.

VPS Inventory

Host IP Username Services
Internal [REDACTED] [REDACTED] Gateway, Nextcloud, Providers
VPS1 (DE) [REDACTED] [REDACTED] Provider, Nextcloud
VPS2 (US) [REDACTED] [REDACTED] WireGuard, Providers, Nextcloud

Setup

Edit scripts to add your credentials:

# Set these variables in each script:
USER="your-username"
PASS="your-password"

# Or use SSH keys:
# Add keys to ~/.ssh/ and modify scripts to use key auth

Quick Usage

# Run command on all VPS
~/.openclaw/workspace/skills/vps-command-runner/scripts/run-all.sh "docker ps"

# Run command on specific VPS
~/.openclaw/workspace/skills/vps-command-runner/scripts/run.sh [IP] "systemctl status docker"

# Check provider status everywhere
~/.openclaw/workspace/skills/vps-command-runner/scripts/run-all.sh "docker ps --filter name=urnetwork --format \"{{.Names}}\" | wc -l"

# Update all providers
~/.openclaw/workspace/skills/vps-command-runner/scripts/run-all.sh "docker pull bringyour/community-provider:g4-latest"

Scripts

  • run-all.sh <command> — Execute on all VPS
  • run.sh <ip> <command> — Execute on specific VPS
  • status.sh — Quick health check of all VPS

SSH Setup

Default: password authentication (edit scripts to change)

For key-based auth:

  1. Add keys to ~/.ssh/
  2. Modify scripts to use: ssh -i ~/.ssh/key ... instead of sshpass