MCP SSH Manager is a server based on the Model Context Protocol (MCP) that enables Claude Code and OpenAI Codex to manage multiple SSH connections. It provides 37 tools, allowing users to execute commands, transfer files, manage databases, create backups, monitor health status, and automate DevOps tasks across servers directly within AI assistants.
[Main Capabilities]
- Remote SSH management: execute commands, file transfer and rsync, database dump and query, backup, health monitoring, tunneling, and per-server security modes.
- 37 MCP tools, covering command execution, file upload/deployment, database operations, backup scheduling, key management, alert setup, process management, etc.
- Supports MCP clients such as Claude Code and OpenAI Codex.
[Security Mechanisms] The tool positions itself as "the most dangerous tool you hand to an AI agent," so security design is core:
- The agent's permission scope is determined per server rather than globally.
- Security modes: unrestricted (default, no additional restrictions); readonly (blocks mutating tools such as ssh_upload, ssh_deploy, ssh_sync, ssh_execute_sudo, ssh_backup_*, ssh_db_import/dump, and applies a built-in denylist to ssh_execute, such as rm, mv, dd, mkfs, chmod, chown, sudo, systemctl restart/stop, docker rm/stop, piping to sh, redirection outside /tmp, curl|sh, etc.); restricted (each command must match at least one ALLOW_PATTERNS regex and must not match any DENY_PATTERNS regex, DENY takes precedence, when there are no ALLOW_PATTERNS everything is denied, fail-closed).
- Command aliases are expanded before policy evaluation, preventing bypassing DENY patterns through aliases.
- Audit logging: JSONL logging can be optionally enabled per server (SSH_SERVER_<N>_AUDIT_LOG=/path/to/audit.jsonl),recording timestamp, server, tool, parameters, whether allowed, rejection reason, exit code/success status; sensitive parameter fields (password, passphrase, sudoPassword, token, secret, apikey) are replaced with ***.
- The sudo password is transmitted via stdin over the SSH channel and does not appear in the remote command line, ps, /proc/<pid>/cmdline, or auditd records.
- All database parameters are shell-quoted through a centralized shellQuote(), accompanied by injection tests with 648 combinations.
- ssh_db_query enforces read-only SQL, rejecting non-SELECT statements; queries are passed on stdin via a single-quoted heredoc, avoiding remote shell parsing of backticks or $(…).
- Host key verification: host key changes are rejected, consistent with OpenSSH behavior.
- Configuration files, aliases, active profiles, and logs are stored in ~/.ssh-manager/, readable only by the user, rather than installed inside the package.
- Reproducible installation: lockfile is committed, CI installs using npm ci, and there are tests ensuring dependencies resolve to registry.npmjs.org with integrity hashes and no unreviewed install scripts.
[Versions and Security Fixes] The material lists release notes from v3.4.0 to v3.8.6, including multiple security fixes and feature updates:
- v3.8.6 (October 8, 2026): security release, fixing six security advisories. These include: command injection caused by the default on-error hook (GHSA-759m-wfpq-xmx3); restricted mode only checking the start of the line (GHSA-rfxw-26h6-7w42); cwd not quoted when entering the shell (GHSA-37fv-fcpc-j236); ssh_db_query being writable (GHSA-9w6j-vg8f-hp8g, GHSA-q37w-vhpx-q5q9); host keys never being compared (GHSA-cwg3-pfmm-w8rm); ssh_deploy and ssh_backup_schedule quoting all values, and cron schedules must be valid schedules; hook settings, aliases, active profiles, and logs moved to ~/.ssh-manager/.
- v3.8.4: Logs no longer write secrets in plaintext; CodeQL runs on every commit.
- v3.8.2 / v3.8.3: Fixed sudo password leak; added the official MCP Registry, released with SLSA provenance and CycloneDX SBOM.
- v3.8.1: Reproducible installation and blocking quality gates.
- v3.8.0: Group field in configuration, ssh_sync supports Windows, fixed tunnel crash.
- v3.7.0: Optional SSH agent forwarding per server (FORWARD_AGENT / forward_agent).
- v3.6.7: Fixed command injection in database helper tools.
- v3.6.6: Fixed SUDO_PASSWORD / DEFAULT_DIR / ssh_sync key authentication.
- v3.6.5: ssh_db_query shell injection security fix and real row_count.
- v3.6.4: Internal cleanup and dead code quality gates.
- v3.6.3: ssh_sync reports real transfer counts.
- v3.6.2: Richer tool descriptions (all 37 tools rewritten).
- v3.6.1: Cleanup module-level timers no longer pin the event loop.
- v3.6.0: Real-time configuration hot reload + stdio lifecycle fixes.
- v3.5.1: Robust SSH ping health check on Windows/OpenSSH.
- v3.5.0: Per-server security modes readonly / restricted + audit logging.
- v3.4.1: Compatible with modern OpenSSH 9.x.
- v3.4.0: Windows OpenSSH support + shell-independent session synchronization.
- v3.3.0: ProxyCommand, etc. (material truncated here).
[Usage] The material does not provide complete installation commands or configuration steps; it only mentions: configuration can be done via .env or a TOML file, supports the interactive wizard ssh-manager server add, supports real-time configuration hot reload (lazy reload based on file signature path + mtime + size, retaining the last valid configuration on failure, with process.env variables always having the highest priority). The tool runs as an MCP server, for invocation by MCP clients such as Claude Code and OpenAI Codex. Specific installation, configuration, and invocation steps are not yet provided.
[Applicable scenarios]
- DevOps automation: executing commands, deployment, synchronization, and backup across servers.
- Database operations and maintenance: dump, query (read-only), import, export.
- Server health monitoring and alerting.
- When sharing MCP with third-party agents, CI bots, or any client that should not unconditionally trust ssh_execute, use per-server security modes for restriction.
[Limitations and precautions]
- This tool grants AI agents SSH access and is a high-risk tool; security modes and permission scopes must be configured carefully.
- Security modes are selectively enabled per server; when the MODE field is not set, behavior is the same as v3.4.x (unrestricted).
- In restricted mode, if there is no ALLOW_PATTERNS, everything is denied (fail-closed).
- After a host key change, run ssh-keygen -R <host> once.
- Some platform- and shell-related fixes indicate that there were previously compatibility issues in environments such as Windows OpenSSH, custom/slow/AIX shells, and these have been improved in v3.4.0 and later versions.
- Database queries run in read-only transactions; MongoDB queries must be filter documents.