-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Common issues and their fixes.
Cause: the MCP client has not loaded the server entry.
Fix:
- Confirm the entry was written: run
ssh-mcp install --client <client> --config ./ssh-mcp.toml --dry-runand check the output. - Restart the client. MCP clients read their config at startup.
- Check the client's config file for the
ssh-mcpentry undermcpServers(orserversfor VS Code).
The SSH client could not connect to the remote server.
Checks:
- Verify
host,port, andusernamein the config. - Verify the auth method. If using a private key, confirm the path is
correct and the key is readable. If using an agent, confirm
SSH_AUTH_SOCKis set and the key is loaded (ssh-add -l). - If connecting through a proxy, verify
proxyis reachable and the proxy type (SOCKS5 or HTTP CONNECT) is correct. - Test the same connection with the
sshCLI to isolate whether the issue is ssh-mcp or the server itself.
- If the key has a passphrase, set it via
passphrasein the config or theSSH_MCP_PASSPHRASEenvironment variable. - For 2FA, enable
try_keyboardand provide the code viaSSH_MCP_2FA_CODE.
If a whitelist is configured, the command must match at least one whitelist pattern. If a blacklist is configured, the command must not match any blacklist pattern.
Fix: adjust the whitelist/blacklist regex patterns in the server
config. Remember the whitelist is checked first when both are set.
The command exceeded the configured timeout.
Fix: increase timeout for the server, or run a faster variant of
the command. Note that max_output_bytes caps captured output; a
command that produces huge output may appear to hang until the cap is
reached.
If allowed_local_paths or allowed_remote_paths is configured, the
path must fall within one of the allowed roots.
Fix: add the directory to the allowed paths, or move the file inside an already-allowed root.
Remote paths must be absolute POSIX paths (for example /srv/file.txt,
not file.txt or ~/file.txt). Tilde is not expanded on the remote
side.
In Docker install mode, the host home directory is bind-mounted at the
same path, so ~/ paths work. Paths outside the home directory require
extra -v mounts in the generated entry. Edit the client's config file
to add the needed -v mounts.
Docker Desktop on Windows does not forward named pipes, so SSH agent forwarding via a unix socket does not work. Use a private key file instead, or run ssh-mcp as a local binary on Windows.
On macOS and Windows (Docker Desktop), host paths are translated through
a VM layer and absolute paths differ from what the container sees. Some
manual -v adjustment may be needed in the generated entry.
If server-status returns reachable: true but most fields are empty,
the batched probe script failed. This typically means the remote is not
a Linux host or is missing the expected utilities (ip, lscpu,
free, df, ps, top, uname, optionally nvidia-smi and
systemctl). Missing utilities produce empty values, not errors.
Fix: install the missing utilities on the remote, or restrict which probes run by tightening the whitelist to only the commands the remote supports.
The workflow uses ${{ github.token }} with permissions: contents: write. If the repository's default token permissions are set to
read-only (Settings > Actions > General > Workflow permissions), the
push fails. Either:
- Set the workflow's
permissions: contents: writeexplicitly (already done inwiki-sync.yml), and ensure the repo allows workflows to override the default, or - Change the repo default to "Read and write permissions".
All logging goes to stderr (stdout is reserved for MCP stdio framing). To see logs when running manually:
ssh-mcp --config ./ssh-mcp.toml 2>ssh-mcp.logWhen running under an MCP client, the client captures stderr; check the
client's MCP server logs (for example, Claude Desktop's
mcp.log).