Universal SSH remote deployment tool - multi-server management, batch deployment, installation script templates with domestic mirror optimization. Supports remote installation of Git, Docker, MySQL, PostgreSQL, Nginx, Node.js, Redis, Python and more.
when
Use when you need to deploy Linux servers remotely, batch install software, or manage SSH connections (install Docker, configure databases, sync files across servers)
examples
[{"user":"Install Docker on my server","assistant":"Use ssh-deploy to install Docker"},{"user":"Deploy environment on three servers at once","assistant":"Use ssh-deploy for batch deployment"},{"user":"Configure Aliyun mirrors on new server","assistant":"Use ssh-deploy to set up domestic mirrors"},{"user":"Upload config files to all backend servers","assistant":"Use ssh-deploy to upload files in batch"},{"user":"Run database migrations on all test servers","assistant":"Use ssh-deploy to execute batch commands"}]
A universal SSH remote deployment tool for managing Linux servers with batch operations, file transfers, and templated software installations. Optimized for domestic network environments with built-in mirror configuration for Chinese mirrors (Aliyun, Tsinghua, etc.).
Quick Start
1. Initial Setup
cd /root/.openclaw/workspace/skills/ssh-deploy-skill
# Auto setup (checks dependencies, creates config)
bash scripts/setup.sh
# Manual dependency install if auto fails
pip3 install --user paramiko
2. Configure Servers (Two Methods)
Method A: Use inventory.json (Traditional)
Edit ~/.ssh-deploy/inventory.json or add servers via CLI:
All templates in templates/ come pre-configured with domestic mirrors.
# Install Docker (auto-configured with China mirrors)cat templates/install_docker.sh | python3 scripts/deploy.py exec tag:docker "bash -s"# Install MySQL (password via environment variable)
MYSQL_ROOT_PASSWORD=YourPass123 cat templates/install_mysql.sh | \
python3 scripts/deploy.py exec db-01 "bash -s"# Base setup (system updates + mirrors)cat templates/base_setup.sh | python3 scripts/deploy.py exec group:all "bash -s"
📦 Installation Script Templates
Template
Software
China Mirror
Env Vars
base_setup.sh
Base environment
✅
-
install_git.sh
Git
❌
GIT_USER_NAME, GIT_USER_EMAIL
install_docker.sh
Docker CE +加速器
✅
-
install_mysql.sh
MySQL 8.0
✅
MYSQL_ROOT_PASSWORD
install_postgresql.sh
PostgreSQL 15
✅
PG_VERSION
install_nginx.sh
Nginx
❌
-
install_nodejs.sh
Node.js
✅ (npm)
NODE_VERSION
install_redis.sh
Redis
❌
-
install_python.sh
Python
✅ (pip)
PYTHON_VERSION
Note: All added server configs are saved to ~/.ssh-deploy/inventory.json.
🎯 Core Features
Server Inventory Management (inventory.py)
# List all servers
python3 scripts/inventory.py list
# Filter by group
python3 scripts/inventory.py list --group production
# Filter by tag
python3 scripts/inventory.py list --tag aliyun
# Add server
python3 scripts/inventory.py add SERVER_NAME \
--host IP_OR_HOSTNAME \
--port 22 \
--user USERNAME \
--ssh-key PATH_TO_KEY \
--groups GROUP1,GROUP2 \
--tags TAG1,TAG2 \
--desc "description"