Lets AI clients run commands, transfer files and manage servers over SSH with human approval, an encrypted vault and an audit trail.
Also known as bvisible/mcp-ssh-manager
- Stars
- 543
- Tools
- 37
- Downloads, 30 days
- —
- Latest version
- 4.2.0
- Last commit
- Nov 14, 2026
- License
- MIT
What is SSH Manager MCP?
SSH Manager lets AI clients run commands, transfer files and manage servers over SSH with human approval, an encrypted vault and an audit trail. It exposes 37 tools, such as ssh_execute, ssh_upload, ssh_download.
Summary generated from the project's README
About SSH Manager MCP server
Managing remote infrastructure through AI agents becomes safer with mcp-ssh-manager, which provides a controlled shell for tools like Claude Desktop, Claude Code, and OpenAI Codex. It allows these clients to execute commands, transfer files via SFTP, and perform system tasks such as database backups or health checks on your real servers. The system is designed for developers who want to delegate server administration to an assistant while maintaining strict oversight.
Users can choose between a command-line interface installed via npm or a dedicated desktop application for macOS, Windows, and Linux. The desktop version includes a menu bar icon and system notifications to alert you when an agent is waiting for permission. A key feature is the ability to set approval levels per server, ranging from never to always, ensuring that destructive commands are intercepted. An encrypted vault stores these security settings, and an audit trail helps you monitor every action taken by the AI.
What you can do with it
- 1Monitor server health and performanceAsk your AI client to check CPU, memory, and disk usage across multiple servers to identify bottlenecks.
- 2Automate database backupsInstruct the agent to create a compressed, timestamped backup of your MySQL or PostgreSQL databases.
- 3Deploy files and restart servicesHave the assistant push new build files to a production directory and restart the web server automatically.
- 4Prevent unauthorized destructive actionsUse the approval system to stop an agent from running dangerous commands on production machines.
Written from the project's README. Every use case is checked against a quote from it.
How to install SSH Manager MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall SSH Manager MCP in Claude Code
$ claude mcp add mcp-ssh-manager -- npx -y mcp-ssh-managerInstall SSH Manager MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"mcp-ssh-manager": {
"command": "npx",
"args": [
"-y",
"mcp-ssh-manager"
]
}
}
}Install SSH Manager MCP in VS Code
.vscode/mcp.json
{
"servers": {
"mcp-ssh-manager": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-ssh-manager"
]
}
}
}Install SSH Manager MCP in VS Code CLI
$ code --add-mcp '{"name":"mcp-ssh-manager","type":"stdio","command":"npx","args":["-y","mcp-ssh-manager"]}'Install SSH Manager MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"mcp-ssh-manager": {
"command": "npx",
"args": [
"-y",
"mcp-ssh-manager"
]
}
}
}Install SSH Manager MCP in Codex
$ codex mcp add mcp-ssh-manager -- npx -y mcp-ssh-managerInstall SSH Manager MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.mcp-ssh-manager] command = "npx" args = ["-y", "mcp-ssh-manager"]
Install SSH Manager MCP in Gemini CLI
$ gemini mcp add -s user mcp-ssh-manager npx -- -y mcp-ssh-managerInstall SSH Manager MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"mcp-ssh-manager": {
"command": "npx",
"args": [
"-y",
"mcp-ssh-manager"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for mcp-ssh-manager 4.2.0 in an isolated container with no network and no keys. It answered and listed 37 tools.
SSH Manager MCP tools 37
Read from the server with tools/listssh_executeRuns a shell command over SSH on a named configured server and returns stdout, stderr, and exit code. Mutates remote state depending on the command; not read-only. Expands command aliases before running. Uses the cwd parameter or, if omitted, the server configured default directory; adapts syntax for Linux versus Windows PowerShell targets. Timeout defaults to 120000 ms and is capped at 300000 ms. Under readonly mode destructive commands like rm or dd are refused; under restricted mode the command must match allow patterns. Output is truncated when very large. For a job that outlives the timeout (a training run, a long build) set background to true instead of using nohup yourself: it starts the command detached and returns at once with its pid and the log file it writes to; read that file with ssh_tail (follow: false) and check or stop the job with ssh_process_manager.
ssh_uploadUploads one local file to a remote destination path over SFTP on the named server, overwriting any existing remote file at that path. Mutates remote state and is not idempotent beyond replacing the target. Creates no backup. Requires the local file to exist. Does not use sudo, so the remote path must be writable by the configured SSH user. This tool is blocked entirely on servers set to readonly or restricted security mode. For directory trees use ssh_sync instead.
ssh_downloadDownloads one remote file from the named server to a local destination path over SFTP, overwriting any existing local file at that path. Affects only the local filesystem and is read-only on the remote side, so it stays allowed even on servers in readonly or restricted security mode. Reads the remote file using the configured SSH user, which must have permission to read it. Handles single files only; use ssh_sync for directories.
ssh_syncSynchronizes files or directories between local and remote using rsync over SSH on the named server. Each of source and destination must carry a local: or remote: prefix and one side must be local and the other remote; with no prefix it assumes a push from local to remote. On Windows MCP hosts, provide native Windows local paths such as C:\project or .\project; the tool converts drive-letter and UNC paths to MSYS2 format before spawning rsync. Do not pre-convert a local path to /c/project because Node performs local filesystem checks using Windows path semantics. Mutates the destination. Setting delete true removes destination files absent from source, which is destructive; dryRun true previews without changing anything. Compression is on by default. Password authentication requires sshpass installed locally. Blocked on readonly or restricted servers. Timeout defaults to 30000 ms.
ssh_tailReads the tail of a remote log file on the named server, optionally filtered by a grep pattern. Read-only; it does not modify remote state. Behavior depends on follow, which defaults to true: in follow mode it starts a streaming tail whose output is written to the server process stderr rather than returned, and the response only reports a session note, so to capture content directly set follow to false to get the last N lines back. The lines parameter defaults to 10.
ssh_monitorCollects a read-only snapshot of system resources on the named Linux server by running inspection commands such as top, free, df, ss, and ps. The type parameter selects the view and defaults to overview; other values are cpu, memory, disk, network, and process. Does not change remote state and needs no sudo. The interval and duration parameters are accepted for continuous monitoring intent but a single snapshot is gathered. Targets Linux tooling, so output may be empty on Windows hosts.
ssh_historyReturns the in-memory log of SSH commands previously run through this server process during the current session, formatted with timestamps, server, duration, and success status. Purely local and read-only: it opens no SSH connection and does not persist across restarts. Optional filters narrow the results by server name, by success or failure, and by a search substring in the command text; limit defaults to 20 most recent entries. Does not expose command output, only the commands and their outcomes.
ssh_session_startOpens a new persistent interactive shell on the named configured server and returns a generated session ID. Stateful and side-effecting: it establishes (or reuses pooled) SSH connection and keeps an open shell that preserves working directory, environment, and command history across later ssh_session_send calls, unlike one-shot ssh_execute. The optional name is only a human label. The session stays open and consumes a remote shell until ssh_session_close is called.
ssh_session_sendRuns one command inside an already-open session identified by its session ID, reusing the persisted working directory, environment, and history of that shell. Mutates remote state like any shell command and is not idempotent; cd and export update the saved context for subsequent calls. Commands run through a bash-style shell (Unix-oriented). The security policy of the underlying server is enforced, so readonly or restricted servers may refuse. Default timeout is 30000 ms.
ssh_session_listLists currently active SSH sessions with their ID, server, state, working directory, command count, age, idle time, and any defined variables. Read-only: it inspects in-memory session state and changes nothing on remote hosts or local config. The optional server argument is a case-insensitive substring filter on server name; omit it to list every active session. Closed sessions are excluded from the results.
ssh_session_closeTerminates an open SSH session given its session ID, writing exit to the remote shell, ending it, and discarding its in-memory history and context; the session ID becomes unusable afterward. Destructive to session state but does not delete remote files. Passing the literal value all closes every active session at once, ignoring individual close errors. It does not drop the pooled underlying connection, only the interactive shell.
ssh_execute_groupRuns one command on every server belonging to the named group and returns a per-server success or failure report. Members come from the groups defined with ssh_group_manage plus every server whose configuration carries a matching group field, so a group can exist through the config alone. Mutates remote state on each member and is not idempotent. Best-effort: the security policy of each server is evaluated independently, so readonly or restricted members are reported as failed without aborting the rest unless stopOnError is set. Strategy may be parallel, sequential, or rolling (delay applies between servers). Per-server timeout is 30000 ms; cwd defaults to the default_dir of each server.
Show all 37 toolsShow fewer tools
ssh_group_manageCreates, updates, deletes, and inspects named server groups used by ssh_execute_group, persisting changes to local configuration only with no remote side effects. The action selects the operation: create, update, delete, add-servers, remove-servers, or list. Every action except list requires name; add-servers and remove-servers also require a non-empty servers array. list is read-only and also reports the groups derived from the per-server group field of the SSH configuration, which are read-only here and change only by editing that configuration. Optional strategy, delay, and stopOnError set default group execution behavior.
ssh_list_serversLists all SSH servers defined in the loaded configuration, returning for each the name, host, user, port, authentication type (password or key), default directory, group, and description. Read-only and local: it reads configuration only and opens no SSH connections. Deliberately omits secrets, so no passwords, key paths, passphrases, or sudo passwords are returned. Takes no parameters. Useful as a first call to discover which server names other tools accept.
ssh_deployDeploys a list of local files to remote paths on the named server, uploading each to a temporary location first and then moving it into place. Mutates remote state. By default it backs up any existing target file before overwriting; backup can be disabled per call. Options can set owner and permissions, supply a sudo password, and name a single service to restart afterward. Detects sensible owner and permission defaults from the remote path. Runs pre and post deploy hooks. Blocked entirely on servers in readonly or restricted security mode.
ssh_execute_sudoRuns a command with elevated privileges via sudo on the named server and returns the exit code and output. Prepends sudo when absent. If a password is given, or a sudo password is configured for the server, it is piped to sudo -S and masked in the returned output. Mutates remote state and can be destructive. Honors the cwd parameter or the server default directory and adapts to Linux or Windows. Timeout defaults to 30000 ms. Blocked entirely in readonly mode; in restricted mode the command must satisfy the allow and deny patterns.
ssh_command_aliasManages local shorthand aliases that map a short name to a full command string, stored in local config with no remote execution or side effects. The action selects behavior: add (requires both alias and command), remove (requires alias), list to show all aliases tagged as profile or custom, or suggest to return existing aliases matching a search term passed in the command field. Adding an existing alias overwrites it.
ssh_hooksManages automation hooks that fire around SSH operations such as pre-deploy, toggling them on or off in local configuration only with no immediate remote action. The action selects behavior: list shows each hook with its enabled state, description, and action count; enable and disable flip a hook and both require the hook name; status summarizes which hooks are currently enabled versus disabled. Toggling persists and affects later operations.
ssh_profileManages SSH Manager profiles that bundle command aliases and hooks for different project types, affecting local configuration only with no remote side effects. The action selects behavior: list shows available profiles and the active one, current shows the active profile details, and switch activates a named profile and requires the profile argument. A successful switch reports that Claude Code must be restarted before the new profile takes effect.
ssh_connection_statusInspects and manages the pooled SSH connections held by this server process; affects only local in-memory connections, never remote state. The action parameter selects: status lists active connections with age and keepalive (read-only); reconnect closes then reopens one connection; disconnect closes one connection; cleanup drops aged-out and dead connections. The server parameter is required for reconnect and disconnect and ignored otherwise.
ssh_tunnel_createOpens a new SSH connection to the named server and starts a port-forwarding or SOCKS proxy tunnel that keeps running until closed. The type parameter selects local forward, remote forward, or dynamic SOCKS5 proxy. localPort is always required; remoteHost and remotePort are required for local and remote types but ignored for dynamic. localHost defaults to 127.0.0.1. Returns a tunnel ID used later to close it.
ssh_tunnel_listLists currently active SSH tunnels tracked by this process, showing each tunnel ID, server, type, state, local and remote endpoints, active and total connection counts, bytes transferred, error count, and timestamps. Read-only: it does not create, modify, or close anything. The optional server parameter filters results to one server; omit it to list every active tunnel across all servers.
ssh_tunnel_closeTears down active SSH tunnels created earlier, freeing the bound local ports; this affects only local tunnel state, not the remote host. Exactly one of tunnelId or server must be supplied: tunnelId closes that single tunnel, while server closes every tunnel for the named server and reports how many were closed. Supplying neither raises an error. Closing is final and cannot be undone.
ssh_key_manageManages SSH host key fingerprints in your local known_hosts file for the named server. The action parameter selects: verify, check, and list are read-only comparisons or listings; accept adds or updates the host key in known_hosts; remove deletes it. accept and remove mutate local state and are blocked on servers configured as readonly. server is required for every action except list. autoAccept defaults to false and should be used with caution.
ssh_aliasManages local name aliases that let you reference a configured server by a shorter or alternative name. The action parameter selects add, remove, or list. add creates an alias pointing to an existing server and requires both alias and server; remove deletes an alias and requires alias; list shows all aliases (read-only). add and remove persist the alias mapping locally. The target server must already exist for add to succeed.
ssh_backup_createCreates a database or file backup on the remote server over SSH, writing a compressed archive plus a JSON metadata file into backupDir. Supports mysql, postgresql, mongodb, and files (full is not yet implemented and errors). Database types require database; files requires paths. After writing it prunes backups older than retention days (default 7); compress defaults to true. Runs pre-backup and post-backup hooks.
ssh_backup_listLists existing backups found in backupDir on the remote server, returning each backup id, type, database or paths, size, compression, retention, status, and creation time parsed from stored metadata. Read-only: it inspects the filesystem and mutates nothing. Optional type filters results to mysql, postgresql, mongodb, files, or full. backupDir defaults to the configured backup directory.
ssh_backup_restoreRestores a previously created backup identified by backupId, reading its metadata to pick the engine. This is destructive and overwrites the target: PostgreSQL runs pg_restore with --clean --if-exists which DROPs existing objects, MongoDB runs mongorestore --drop, and MySQL pipes the dump into the live database replacing matching objects. Supports mysql, postgresql, mongodb, and files. Runs pre-restore and post-restore hooks.
ssh_backup_scheduleSchedules a recurring backup on the remote server by writing an executable bash script to /usr/local/bin/ssh-manager-backup-NAME.sh and installing a crontab entry for the given cron expression. Mutates the remote filesystem and crontab, and typically needs root to write that path. Supports mysql, postgresql, mongodb, and files; the generated script also deletes backups older than retention days (default 7).
ssh_health_checkRuns a comprehensive read-only health check on the named server by executing diagnostic shell commands over SSH, then returns parsed JSON with overall status, CPU, memory, disk usage, and uptime. It only reads metrics and changes nothing on the remote host. Set detailed to true to additionally include load average and network metrics; it defaults to false. Critical CPU, memory, or disk conditions are surfaced in a critical_issues list.
ssh_service_statusChecks the running state of the named system services on a remote server by querying each one over SSH, returning JSON per service plus running and stopped counts and an aggregate health rating. Read-only: it inspects status without starting, stopping, or restarting anything. The services array parameter is required and lists the service names to check, for example nginx, mysql, or docker; common names are resolved to their actual unit names automatically.
ssh_process_managerLists, inspects, or terminates processes on a remote server over SSH. The action parameter selects: list returns top processes (read-only), info returns details for one process (read-only), and kill sends a signal to terminate a process and mutates remote state. pid is required for kill and info. kill is blocked on servers configured as readonly. signal defaults to TERM, sortBy defaults to cpu, and limit defaults to 20; filter narrows the list by name or command.
ssh_alert_setupConfigures and evaluates CPU, memory, and disk usage alert thresholds for a remote server. The action parameter selects: set writes the threshold config to /etc/ssh-manager-alerts.json on the remote host (mutating, may need write access to /etc, and is blocked on readonly servers); get reads back that config; check reads current metrics and compares them to stored thresholds. get and check are read-only. enabled defaults to true; check errors if no config exists yet.
ssh_db_dumpDumps a database to a file on the remote server over SSH; it reads data only and does not modify the database. Supports mysql (using --single-transaction --routines --triggers), postgresql (custom format with --clean --if-exists, restorable via pg_restore), and mongodb. compress defaults to true and gzips the output. The optional tables list applies to MySQL and PostgreSQL only and is ignored for MongoDB.
ssh_db_importImports a dump file into a target database on the remote server and is destructive to existing data. PostgreSQL uses pg_restore --clean --if-exists which DROPs existing objects before loading; MongoDB uses mongorestore with --drop controlled by the drop flag (default true); MySQL pipes the file into the live database, replacing objects defined in it. Supports mysql, postgresql, mongodb. Compressed .gz inputs are decompressed automatically.
ssh_db_listLists database objects on the remote server for the given engine without modifying anything. When database is provided it lists the tables (SQL) or collections (MongoDB) of that database; when omitted it lists all databases with common system databases filtered out. Supports mysql, postgresql, and mongodb. Returns the items and a count. Read-only and safe to call repeatedly.
ssh_db_queryRuns a read-only query against a remote database. For mysql and postgresql it is strictly limited to one SELECT statement: the query must begin with SELECT, and INTO, file functions, and any insert, update, delete, drop, create, alter, truncate, grant, revoke, or exec keyword are rejected before execution; it then runs inside a read-only transaction, so the database itself refuses any write. For mongodb it runs a find() and requires the collection parameter; the query must be a filter document (JSON or mongo shell syntax such as ObjectId("…")), and $where, $function and $accumulator are refused. Returns the raw command output as text.
Configuration
MCP_SSH_COMPACT_JSONMCP_SSH_DEFAULT_TIMEOUTMCP_SSH_MAX_OUTPUT_LENGTHSSH_CONFIG_PATHPath to a TOML file holding the server definitions. Defaults to ~/.codex/ssh-config.toml. Each server can set MODE to readonly or restricted to constrain what the agent may run.
SSH_ENV_PATHPath to a .env file declaring servers as SSH_SERVER_<NAME>_HOST, _USER, _KEYPATH and friends. Defaults to a .env next to the package.
SSH_SERVER_BASTION_HOSTSSH_SERVER_BASTION_KEYPATHSSH_SERVER_BASTION_USERSSH_SERVER_PRIVATE_HOSTSSH_SERVER_PRIVATE_PROXYJUMPSSH_SERVER_PRIVATE_USERSSH_SERVER_PROD_AUDIT_LOGSSH_SERVER_PROD_MODESSH_SERVER_SOCKS_PROXYCOMMANDSSH_SERVER_STAGING_ALLOW_PATTERNSSSH_SERVER_STAGING_MODESSH_SERVER_WEB1_GROUPSSH_SERVER_WEB2_GROUPSSH_SERVER_WINPROXY_PROXYCOMMAND
Automated checks
Ran Nov 16, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablebvisible/mcp-ssh-manager is public and reachablegithub.com/bvisible/mcp-ssh-manager ↗Pass
- Package names this repository as its sourcemcp-ssh-manager names bvisible/mcp-ssh-manager as sourcenpmjs.com/package/mcp-ssh-manager ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for mcp-ssh-managernpmjs.com/package/mcp-ssh-manager/v/4.2.0#provenance ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-14github.com/bvisible/mcp-ssh-manager ↗Pass
- OpenSSF ScorecardOpenSSF Scorecard 8.1 / 10; weakest: Code-Review 0, Signed-Releases 0, CII-Best-Practices 2scorecard.dev/viewer/?uri=github.com/bvisible/mcp-ssh-manage ↗Pass
- Package name not close to a popular packageNo popular package one edit away from mcp-ssh-managerPass
- No critical advisory in the package or its dependenciesthe package checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model37 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubThe problem, in one line
An MCP SSH server is the most dangerous tool you can hand an agent: a shell on machines that matter. Today, when your agent runs something on production, you find out afterwards — if you find out at all.
This one lets you watch, and lets you say no. It is also, on the boring days, simply a very good way to let an assistant do the server work you were going to do yourself.
Choose your workspace
Desktop application (4.0.3): one installation with its own runtime,
terminal, file browser and server settings. No separate Node.js or npm
installation. Download it:
| Platform | File | Signature |
|---|---|---|
| macOS, Apple silicon / Intel | …-arm64.dmg / …-x64.dmg |
Signed and notarized by Apple — opens normally |
| Windows x64 / arm64 | …-setup.exe |
Not code-signed in 4.0.x. Windows shows "Windows protected your PC": More info → Run anyway. Check the file against the SHA-256 in release-manifest-win32.json on the release (ssh-manager app does it for you). Signing comes in a later release. |
| Linux x64 | .deb, .AppImage |
Unsigned, as Linux packages usually are |
Already using npm / the CLI? npm update -g mcp-ssh-manager brings 4.0.3,
and the V4 engine runs without an interface, from your existing .env, TOML or
process variables — no automatic import, no forced wizard, no approval prompt
unless you enable one per server. The one behaviour that tightens is SSH
host-key verification; read that section of the
upgrade and rollback guide before upgrading. To stay on 3.8
for now, pin it: npm install -g mcp-ssh-manager@3.
From the engine to the application in one step. With a V4 engine installed,
ssh-manager app downloads the desktop application of the engine's own version,
checks it against the release (size and SHA-256 from the release manifest, and
on macOS Apple's signature and notarization), installs it and opens it — or just
opens it when it is already there. The browser interface of ssh-manager control
offers the same as one button. Your agents keep using the npm engine; the
application is the window on top of it. Nothing is downloaded unless you ask.
Without npm at all. The application carries the engine too, and your AI
tools can start that one: Options → AI tools lists Claude Code, Claude Desktop
and Codex, says which ssh-manager each one starts (npm's, the application's, or
none yet) and switches it in one click — no Node, no terminal. The same tab, in
ssh-manager control, shows npm users which version each tool really runs.
A switch rewrites that tool's one ssh-manager entry, keeps its environment
variables, and takes effect when the tool next starts; switching back is the
same click.
Updates. The application checks for a new version at launch and every six hours and says so where you will see it: a mark on the sidebar, Options → Updates (the running version, the one on offer, a Check now button, release notes) and, once per version, a notification. Downloading is a click, and installing is a second one (Restart to update) or happens when you quit. The npm engine updates with npm, on its own schedule. A change to the interface reaches npm users with the next npm release and application users with the next application release.
Up and running with npm
npm install -g mcp-ssh-manager # or: brew tap bvisible/mcp-ssh-manager https://github.com/bvisible/mcp-ssh-manager && brew install ssh-manager
ssh-manager server add # guided: host, user, key or password
claude mcp add ssh-manager mcp-ssh-manager
That's it. Restart Claude Code and ask it something.
OpenAI Codex — same install, then two files. In ~/.codex/config.toml:
[mcp_servers.ssh-manager]
command = "mcp-ssh-manager"
env = { SSH_CONFIG_PATH = "/Users/you/.codex/ssh-config.toml" }
startup_timeout_ms = 20000
And your servers in ~/.codex/ssh-config.toml:
[ssh_servers.production]
host = "prod.example.com"
user = "admin"
key_path = "~/.ssh/id_rsa"
default_dir = "/var/www"
group = "production"
Everything below works identically from Codex — same 37 tools, same config fields.
From source:
git clone https://github.com/bvisible/mcp-ssh-manager.git
cd mcp-ssh-manager && npm install
cd cli && ./install.sh
claude mcp add ssh-manager node /absolute/path/to/mcp-ssh-manager/src/index.js
The MCP engine needs no build. To use the interface (ssh-manager control) from a
checkout, build it once: npm run build:ui (the published package and the desktop
app already carry it).
Scopes — --scope project writes an .mcp.json your team can commit; --scope user enables it everywhere for you.
Prerequisites — Node 18+, on Linux, macOS or Windows. rsync for ssh_sync, sshpass only if you sync with password auth (brew install hudochenkov/sshpass/sshpass, or apt-get install sshpass).
Then just ask
No syntax to learn. Your assistant already knows how to use the 37 tools; you talk to it in your own words.
| You say | What happens |
|---|---|
| "Why is production slow right now?" | CPU, memory, disk, load average and the top processes, in one round trip |
| "Back up the database before I deploy." | A compressed, timestamped MySQL/PostgreSQL/MongoDB dump with a retention policy |
| "Tail the nginx error log on staging." | Live output, streamed as it happens |
| "Push ./dist to production:/var/www and restart nginx." | The files out, then the restart — with ownership, permissions and a rollback copy handled |
| "Which of my servers is running out of disk?" | Every server in the group, checked in parallel |
| "Open a tunnel to the production database." | Local port forward, so your GUI client just connects |
"Run docker ps on everything tagged production." |
One command, the whole group, sequential or parallel |
Watch over its shoulder — the control plane
New in 4.0.0. The application is opt-in: with no vault and no approval enabled, the engine keeps working headlessly, exactly as 3.8.x. See the migration guide for host-key verification and recovery behaviour.
ssh-manager control # prints a local URL — or `ssh-manager app` for the desktop app
One thing in two wrappers. ssh-manager control runs the whole interface in a browser tab with nothing extra to install; the desktop builds for macOS, Windows and Linux are that same page with the engine inside them, so they need neither Node nor the npm package.
The desktop build adds the two things a browser tab cannot do:
- It lives in the menu bar. The icon carries a count when something is waiting, and its menu lists what is blocked on you, which shells and commands are open right now, and your servers — so "is anything waiting on me?" costs a glance instead of a window switch. Closing the window leaves it there rather than quitting.
- It posts real system notifications, with the application's own identity, so macOS and Windows show and route them properly. Destructive requests stay on screen instead of fading after four seconds. macOS asks your permission the first time it needs to.
Stop it before it runs
The agent pauses and waits. You see the machine, the user, the tool, and the command in full — wrapped, never truncated, because half a command is how you approve the wrong thing. A desktop notification fires when something is waiting, because the request that goes unseen is the one that times out and is denied.
Approval is switched on from the interface, per server — not from a file:
Servers → the server → Approval → never (default) | destructive | always
Approval is stored in the vault and cannot be overridden by .env or process
variables. Editing connection details preserves it. This prevents accidental
configuration overrides from disabling the gate; it is not a security boundary
against a process that already controls your local user account or vault files.
If you had SSH_SERVER_*_APPROVAL set in a file, the engine says
so on every start rather than quietly leaving you unprotected.
The destructive list is deliberately short. A prompt that cries wolf gets clicked through without being read, which is worse than no prompt at all: systemctl restart does not interrupt you, systemctl stop does.
When a request requires approval, a timeout, unreachable socket or disconnected control plane denies it. If nothing is listening, start ssh-manager control or the desktop app before retrying. Servers with approval disabled keep working headlessly.
See what it's doing, while it does it
Output goes through a terminal emulator, not a <pre> tag — what your agent ran looks exactly like what you'd have seen had you typed it yourself, colours and all. Each stream keeps a bounded scrollback, so opening the screen mid-command shows what came before instead of starting blank.
Nothing here touches the disk. A stream can carry secrets — a config being catted, a token echoed by a deploy script — so it lives in memory, capped, and disappears with the window.
Both filesystems, side by side
Drag a file across and it moves directly between your machine and the server through the control plane. The browser never holds the bytes — which is faster, and the only way a multi-gigabyte file works at all.
Health, when you ask for it
Nothing is probed in the background. Each check is an SSH handshake, and a dashboard that connects to every production box on a timer is worse than no dashboard. The button is the whole scheduling policy. Thresholds are yours to set, and crossing one is said in words rather than encoded in a colour.
A shell on any machine
Pick a machine, get a shell — the same one an agent gets, with your keyboard on it. Useful for the ordinary reasons, and for the one people ask about most: running an agent on the server rather than pointing one at it.
Including this machine. The desktop application opens a shell on your own computer too, with your login shell and everything you have configured in it, so you are not switching to a different window to run the local half of the same job. Open as many as you like, on any mix of machines: each is a tab across the top and an entry in the rail, and switching away leaves it running.
Beside it, the commands you would rather not retype, saved per server or for all of them, and picked from a list inside any shell.
And the rest of it
On the same page: an interactive shell on any server, saved commands you pick from a list instead of retyping, groups you can run one command across, the audit trail of what agents ran and what you decided, and your known host keys.
Every screenshot above is the desktop build; each has a browser twin in docs/images/. See ROADMAP-V4.md for what is built and what isn't.
Safe by default
Other SSH MCP servers hand the agent a shell and wish you luck. This one assumes you'd like some say in the matter.
Decide how far it can go — per server
| Mode | What the agent can do |
|---|---|
unrestricted (default) |
Everything. Same as any other SSH MCP server, zero overhead. |
readonly |
Mutating tools are refused outright — no deploy, no upload, no sudo, no database import. Reads still work. |
restricted |
Every command must match an allow pattern and no deny pattern. Anything else is refused before it reaches the host. |
SSH_SERVER_PROD_MODE=readonly
SSH_SERVER_STAGING_MODE=restricted
SSH_SERVER_STAGING_ALLOW_PATTERNS=^systemctl (status|restart) myapp$;^tail -n \d+ /var/log/
SSH_SERVER_PROD_AUDIT_LOG=~/.ssh-manager/audit.jsonl
This is a second layer under Claude Code's autoApprove, which is all-or-nothing per tool: once ssh_execute is approved, anything goes. Useful when you're sharing the MCP with a third-party agent, a CI bot, or working on a client's machine. Full reference in docs/SECURITY_MODES.md.
Credentials out of the clear-text .env
ssh-manager vault import # take what you already have, encrypted
ssh-manager vault list # see it, without ever printing a secret
ssh-manager vault add prod # add one interactively
ssh-manager vault backup FILE # a copy that survives a new machine
AES-256-GCM, master key in your OS keychain (a 0600 file where there is none — Windows, CI, containers). Only secret values are encrypted: hosts, users and modes stay readable, so the file can still be inspected and diffed. GCM is authenticated, so a tampered vault fails loudly instead of handing a wrong password to a production server.
The key belongs to this machine. A vault copied to a new laptop is ciphertext nobody can open — vault backup writes a copy encrypted under a passphrase you choose, which is what makes the move survivable. Your .env is never modified, not by import, not by the interface, and a setup half in each is a normal state rather than a broken one. Upgrading changes nothing on its own: see docs/MIGRATION.md.
The unglamorous parts, which are the ones that bite
- Your sudo password never reaches the remote command line. It travels on the SSH channel's stdin, so it isn't visible in
ps, in/proc/<pid>/cmdline, or in anauditdtrail — unlike theecho "$pass" | sudo -Spattern common in this category (#34). - Every shell argument is quoted through one central helper, with a test that drives 340 builder × argument × payload combinations through a real shell to prove none of them execute.
- Read-only SQL is enforced, not suggested.
ssh_db_queryrefuses anything that isn't aSELECT, runs it inside a read-only transaction, and never lets thepsqlormysqlclient read it as a script, where their own commands (\!) would reach a shell. A MySQL query is therefore one line, without backslashes. - Vulnerabilities are published, not buried. SECURITY.md has the reporting process and every advisory already fixed — including the six in v3.8.6, among them a command injection on the machine running the server, triggered by any SSH server it connects to.
- Reproducible installs. The lockfile is committed, CI installs with
npm ci, and a test enforces that every dependency resolves to registry.npmjs.org with an integrity hash and no unreviewed install scripts.
Questions people ask
Can I let an AI agent SSH into my servers safely?
Yes, if you decide how far it can go. Per server you can make it read-only, allow only commands that match a pattern, or hold every request (or only the destructive ones) until you approve it in the control plane; credentials can live in an encrypted vault instead of a clear-text .env; and every command and decision is logged. See Safe by default.
How do I use Claude Code or Codex with SSH?
npm install -g mcp-ssh-manager, add a server with ssh-manager server add, then claude mcp add ssh-manager mcp-ssh-manager. Codex is set up here. Then ask in plain words: "why is production slow?", "tail the nginx error log on staging".
Does it work with Cursor, Windsurf, Cline or another MCP client? It is a standard stdio MCP server, so any MCP client can run it. Claude Code, Claude Desktop and Codex are the clients documented and tested here. For another one, add what it expects, for example:
{ "mcpServers": { "ssh-manager": { "command": "npx", "args": ["-y", "mcp-ssh-manager"] } } }
Do I need Node.js? With npm, yes (Node 18 or later). The desktop application carries its own runtime and engine: install it and connect your AI tools from Options → AI tools, with no Node and no npm.
How is this different from other SSH MCP servers?
Most hand the agent a shell. This one lets you choose per server how far it goes, can hold requests until you approve them, keeps an audit trail, and has a desktop app and a browser interface to see it all. It also runs without any of that, as a plain engine configured from a .env or a TOML file, if that is what you want.
Where are my passwords and keys kept?
Key files stay where they are. Saved passwords and passphrases can go into the encrypted vault (AES-256-GCM, with the key in your operating system's keychain) rather than a .env.
Is it free? Yes, it is MIT-licensed. The source is here, the package is on npm and the desktop apps are on the releases page.
SSH Manager MCP questions
How do I add SSH Manager MCP to Claude Code?
Run claude mcp add mcp-ssh-manager -- npx -y mcp-ssh-manager in your terminal. Add --scope user to make it available in every project.
How do I add SSH Manager MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does SSH Manager MCP provide?
It exposes 37 tools, including ssh_execute, ssh_upload, ssh_download, ssh_sync, ssh_tail.
Which AI clients can use this SSH MCP server?
It works with Claude Code, Claude Desktop, OpenAI Codex and any MCP client, using the same 37 tools.
Can I approve or refuse agent commands before they run?
Yes. Approval can be set per server to never, destructive-only, or always, and you can refuse a pending request.
How do I install and register it with Claude Code?
Install globally with npm, add a server, then register it with claude mcp add.
What are the prerequisites?
Node 18+ on Linux, macOS or Windows, with rsync for ssh_sync and sshpass only if you sync with password auth.
Can it forward ports for database access?
Yes, it can open a local port forward so a GUI client can connect to a remote database.