MCP SSH管理 是 AI Skill Hub 本期精选MCP工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
MCP SSH管理 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
MCP SSH管理 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/bvisible/mcp-ssh-manager
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"mcp-ssh--": {
"command": "npx",
"args": ["-y", "mcp-ssh-manager"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 MCP SSH管理 执行以下任务... Claude: [自动调用 MCP SSH管理 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"mcp_ssh__": {
"command": "npx",
"args": ["-y", "mcp-ssh-manager"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
A Model Context Protocol (MCP) server that enables Claude Code and OpenAI Codex to manage multiple SSH connections. Execute commands, transfer files, manage databases, create backups, monitor health, and automate DevOps tasks across your servers — directly from your AI assistant.
</div>
<p align="center"> <img src="docs/images/ssh-manager-cli-menu.png" alt="ssh-manager interactive CLI menu" width="900"> </p>
---
Richer tool descriptions — better AI tool-calling (Released: June 9, 2026)
ssh_db_import and ssh_backup_restore are destructive, ssh_db_query is SELECT-only, and ssh_upload/ssh_deploy are blocked on readonly servers.description strings changed; logic, parameters, and tool names are identical. All tests pass unmodified.---
.env file setup with guided configuration tool---
brew install hudochenkov/sshpass/sshpassapt-get install sshpass.env path resolution now uses a fallback chain instead of hardcoded __dirname — works correctly with npm install -g (#16, #19)~/.ssh-manager/.env → cwd/.env → ~/.env → project .env~/.ssh-manager/.env on first ssh-manager server addssh-manager CLI registered as binary: npm install -g now creates both mcp-ssh-manager and ssh-manager commands (#18)```bash
Option A: Install from npm (recommended)
```bash
npm install -g mcp-ssh-manager
npx mcp-ssh-manager
**Option B: Install from source**
bash
git clone https://github.com/bvisible/mcp-ssh-manager.git cd mcp-ssh-manager npm install
cd cli && ./install.sh
```bash
```
unrestricted (default, no field needed) — identical to pre-v3.5.0 behavior. Zero overhead.readonly — blocks ssh_upload, ssh_deploy, ssh_sync, ssh_execute_sudo, backup/db write tools, and built-in destructive commands (rm, mv, sudo, systemctl restart, redirects outside /tmp, curl | sh, …).restricted — every ssh_execute command must match at least one ALLOW_PATTERNS regex AND no DENY_PATTERNS regex.Existing configs are unaffected — no field is mandatory, no behavior changes unless you opt in. See docs/SECURITY_MODES.md for the full reference, recipes, and limitations.
Same installation as Claude Code (see above), then configure for Codex:
```bash
#### ssh_deploy 🚀 Deploy files with automatic permission and backup handling. - Parameters: server, files (array), options (owner, permissions, backup, restart) - Automatically handles permission issues and creates backups
#### ssh_execute_sudo 🔐 Execute commands with sudo privileges. - Parameters: server, command, password (optional), cwd (optional) - Securely handles sudo password without exposing in logs
claude mcp list
1. Fork the repository 2. Clone and install dependencies 3. Setup pre-commit hooks for code quality:
./scripts/setup-hooks.sh
4. Create your feature branch 5. Make your changes (hooks will validate on commit) 6. Push to your branch 7. Open a Pull Request
ssh-manager tools list/configure/enable/disableSSH_SERVER_PRODUCTION_HOST=prod.example.com SSH_SERVER_PRODUCTION_USER=admin SSH_SERVER_PRODUCTION_PASSWORD=secure_password SSH_SERVER_PRODUCTION_PORT=22 SSH_SERVER_PRODUCTION_DEFAULT_DIR=/var/www/html SSH_SERVER_PRODUCTION_DESCRIPTION=Production Server SSH_SERVER_PRODUCTION_SUDO_PASSWORD=secure_sudo_pass # Optional, for automated deployments
SSH_SERVER_WINHOST_HOST=192.168.1.90 SSH_SERVER_WINHOST_USER=svc-ssh SSH_SERVER_WINHOST_KEYPATH=~/.ssh/winhost_key SSH_SERVER_WINHOST_PORT=2222 SSH_SERVER_WINHOST_PLATFORM=windows SSH_SERVER_WINHOST_DESCRIPTION=Windows host via OpenSSH
SSH_SERVER_BASTION_HOST=bastion.example.com SSH_SERVER_BASTION_USER=jumpuser SSH_SERVER_BASTION_KEYPATH=~/.ssh/bastion_key
SSH_SERVER_INTERNAL_HOST=10.0.0.5 SSH_SERVER_INTERNAL_USER=admin SSH_SERVER_INTERNAL_KEYPATH=~/.ssh/internal_key SSH_SERVER_INTERNAL_PROXYJUMP=bastion SSH_SERVER_INTERNAL_DESCRIPTION=Private server behind bastion ```
.env/TOML and the running MCP server picks it up on the next call, no restart. A ServerConfigManager reloads lazily on file-signature change (path + mtime + size); a failed reload keeps the last known-good config; real process.env vars keep top priority. No watcher, no polling.SIGINT handler every session leaked a ~83 MB node process. Shutdown is now idempotent across SIGINT/SIGTERM/SIGHUP/stdin-close, timers are unref()'d, and the process exits ~10 ms after teardown instead of never. Full changelog →ssh-manager tools configure
ssh-manager tools list
| Mode | Tools | Context Usage | Best For |
|---|---|---|---|
| **All** (default) | 37 tools | ~43.5k tokens | Full feature set, most users |
| **Minimal** | 5 tools | ~3.5k tokens | Basic SSH operations only |
| **Custom** | 5-37 tools | Varies | Tailored to your workflow |
ssh-manager server add ```
To avoid being prompted for approval on every SSH command, add auto-approve configuration:
Edit ~/.config/claude-code/claude_code_config.json:
{
"mcpServers": {
"ssh-manager": {
"command": "node",
"args": ["/path/to/mcp-ssh-manager/src/index.js"],
"autoApprove": [
"mcp__ssh-manager__ssh_execute",
"mcp__ssh-manager__ssh_list_servers",
"mcp__ssh-manager__ssh_upload",
"mcp__ssh-manager__ssh_download",
"mcp__ssh-manager__ssh_sync",
"mcp__ssh-manager__ssh_alias"
]
}
}
}
Important: Restart Claude Code after making this change.
For full auto-approval of all SSH tools, see the complete list in examples/claude-code-config.example.json.
autoApprove is all-or-nothing per tool: once ssh_execute is approved, anything goes. If you want a second layer that filters what the MCP server actually accepts to run — useful when sharing the MCP with a third-party agent, a CI bot, or a client's server — declare a per-server security mode.
```bash
SSH_SERVER_CLIENT_PROD_HOST=client-prod.example.com SSH_SERVER_CLIENT_PROD_USER=consultant SSH_SERVER_CLIENT_PROD_KEYPATH=~/.ssh/consultant_ed25519
SSH_SERVER_CLIENT_PROD_MODE=readonly # unrestricted | readonly | restricted SSH_SERVER_CLIENT_PROD_AUDIT_LOG=~/.ssh-manager/audit.jsonl # opt-in JSONL audit trail
ssh-manager codex migrate
If you prefer manual setup, add to ~/.codex/config.toml:
[mcp_servers.ssh-manager]
command = "node"
args = ["/absolute/path/to/mcp-ssh-manager/src/index.js"]
env = { SSH_CONFIG_PATH = "/Users/you/.codex/ssh-config.toml" }
startup_timeout_ms = 20000
Create or edit ~/.codex/ssh-config.toml:
[ssh_servers.production]
host = "prod.example.com"
user = "admin"
password = "secure_password" # or use key_path
key_path = "~/.ssh/id_rsa" # for SSH key auth (recommended)
passphrase = "key_passphrase" # optional, for passphrase-protected keys
port = 22
default_dir = "/var/www"
description = "Production server"
[ssh_servers.staging]
host = "staging.example.com"
user = "deploy"
key_path = "~/.ssh/staging_key"
port = 2222
default_dir = "/home/deploy/app"
[ssh_servers.winhost]
host = "192.168.1.90"
user = "svc-ssh"
key_path = "~/.ssh/winhost_key"
port = 2222
platform = "windows"
description = "Windows host via OpenSSH"
[ssh_servers.bastion]
host = "bastion.example.com"
user = "jumpuser"
key_path = "~/.ssh/bastion_key"
[ssh_servers.internal]
host = "10.0.0.5"
user = "admin"
key_path = "~/.ssh/internal_key"
proxy_jump = "bastion"
description = "Private server behind bastion"
💡 See examples/codex-ssh-config.example.toml for more complete examples!
ssh-manager codex convert to-toml
ssh-manager codex convert to-env ```
Both formats can coexist! The system supports both simultaneously.
---
Servers are configured in the .env file with this pattern:
```env
SSH_SERVER_[NAME]_HOST=hostname_or_ip SSH_SERVER_[NAME]_USER=username SSH_SERVER_[NAME]_PASSWORD=password # For password auth SSH_SERVER_[NAME]_KEYPATH=~/.ssh/key # For SSH key auth SSH_SERVER_[NAME]_PASSPHRASE=key_passphrase # Optional, for passphrase-protected keys SSH_SERVER_[NAME]_PORT=22 # Optional, defaults to 22 SSH_SERVER_[NAME]_DEFAULT_DIR=/path/to/dir # Optional, default working directory SSH_SERVER_[NAME]_DESCRIPTION=Description # Optional SSH_SERVER_[NAME]_PLATFORM=windows # Optional: "linux" (default) or "windows" SSH_SERVER_[NAME]_PROXYJUMP=bastion # Optional: name of another server to use as jump host SSH_SERVER_[NAME]_PROXYCOMMAND=command # Optional: custom proxy command (ncat, ssh -W, etc.)
ssh-manager codex setup
ssh-manager codex test ```
MCP SSH Manager 是一个 Model Context Protocol (MCP) 服务器,允许 Claude Code 和 OpenAI Codex 管理多个 SSH 连接。通过 AI 助手直接执行命令、传输文件、管理数据库、创建备份、监控健康状况和自动化 DevOps 任务。
MCP SSH Manager 的功能包括:多个 SSH 连接管理、安全认证、代理跳转和自定义代理支持、工具描述重写、工具组管理和自动批准配置生成等。
环境依赖与系统要求包括:Node.js (v18 或更高)、npm、Linux、macOS、Windows、Bash 4.0+、rsync 和 Claude Code CLI 或 OpenAI Codex CLI。
安装 MCP SSH Manager 可以通过 npm 全局安装或使用 Docker 镜像部署。注意:全局安装修复了 `.env` 路径解析问题,fallback 链包括 `~/.ssh-manager/.env`、`cwd/.env`、`~/.env` 和项目 `.env`。
使用 MCP SSH Manager 可以通过 CLI 工具管理 SSH 会话、执行命令、传输文件、管理数据库、创建备份、监控健康状况和自动化 DevOps 任务。注意:可以通过 `ssh-manager tools list/configure/enable/disable` 命令管理工具,通过 `ssh-manager codex setup` 和 `ssh-manager codex test` 命令设置和测试 Codex 集成。
配置 MCP SSH Manager 可以通过 `.env` 文件或 TOML 文件进行。注意:配置文件支持热重载,通过 `ServerConfigManager` reloads lazily on file-signature change (path + `mtime` + size) 来实现。
工作流和模块包括:Codex 集成、工具管理、配置管理等。
常见问题包括:安装问题、配置问题、工具管理问题等。
高质量的MCP工具,实现远程SSH管理
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,MCP SSH管理 在MCP工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | mcp-ssh-manager |
| 原始描述 | 开源MCP工具:MCP SSH Server: 37 tools for remote SSH management | Claude Code & OpenAI Codex 。⭐242 · JavaScript |
| Topics | sshmcpautomationbackup |
| GitHub | https://github.com/bvisible/mcp-ssh-manager |
| License | MIT |
| 语言 | JavaScript |
收录时间:2026-06-09 · 更新时间:2026-06-09 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端