Provides agent-controlled SSH sessions with command execution, persistent shells, SFTP, port forwarding, transcripts, and secret redaction.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent ā or use 1-click editor setup below.
This server is confirmed live ā we successfully called its tools/list endpoint directly (see the verified badge above). We haven't yet sandbox-tested the stdio install command below specifically, which is a separate, ongoing check.
š” Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by MCP Remote Ssh.
ssh_connectConnect to a remote host via SSH. Returns a session_id for use with all other tools. Supports password and key-based authentication.
ssh_list_sessionsList all active SSH sessions with their connection status and details. Returns: List of session info dicts.
ssh_close_sessionClose an SSH session and release all its resources (shell, SFTP, port forwards). WARNING: this kills any running processes in the session.
ssh_executeExecute a command on the remote host and return structured output. Each call runs in an independent exec channel -- no state is shared between calls (use ssh_shell_* tools for persistent state). If secrets have been loaded via ssh_load_env_file, they are automatically injected as environment variables for this command.
ssh_sudo_executeExecute a command with sudo on the remote host. If the user already has passwordless sudo, leave sudo_password empty. If secrets have been loaded via ssh_load_env_file, they are automatically injected as environment variables for this command.
ssh_forward_portCreate an SSH port forward (local -> remote). Connections to 127.0.0.1:local_port will be tunneled through SSH to remote_host:remote_port. If local_port is 0, a random available port is chosen.
The faizbawa/mcp-remote-ssh MCP server exposes SSH operations through MCP. An agent can create a connection using password, private-key, or SSH-agent authentication, receive a session ID, and use that ID with later tools. Sessions can be listed or closed, and closing one also releases its shell, SFTP connection, and port forwards.
Command execution returns structured output rather than only a text stream. The server also supports sudo commands, local-to-remote port forwarding, remote file operations through SFTP, and reading text files from the remote host. These capabilities suit remote administration, test machines, CI hosts, lab systems, and development environments where an agent must perform several related operations over SSH.
The MCP process runs on the local machine and opens SSH connections to the selected remote hosts. Ordinary execution uses an independent channel for each command, so working-directory changes and other shell state do not carry between calls. For stateful work, an agent can open an interactive shell; that shell keeps its current directory, environment, and running processes across send, read, wait, and control-character operations.
Secrets are loaded from a file on the local MCP host with ssh_load_env_file. The file uses common .env syntax, including comments, quoted values, and optional export prefixes. Values are retained in memory, supplied to the remote session, and registered for literal-value redaction. Responses from command execution, shell I/O, and remote text-file reads replace matching values with ***. Clearing the secret registry stops future redaction but does not remove variables already exported in the remote shell.
Install the package with uvx mcp-remote-ssh, or install it with pip install mcp-remote-ssh. A stdio MCP client configuration uses uvx as the command and mcp-remote-ssh as its argument:
Connection credentials are supplied when calling ssh_connect; the material does not specify startup environment variables. The remote host must accept the selected SSH authentication method. Unknown host keys are accepted automatically through Paramiko's AutoAddPolicy, which avoids prompts for new machines but leaves first connections vulnerable to man-in-the-middle attacks.
The faizbawa/mcp-remote-ssh MCP server includes tools for:
Transcript recording is disabled by default and can be enabled when connecting or started later. Recorded command and shell output is redacted before it is stored. Transcripts kept in memory are lost when the session closes unless saved or retrieved first.
Secret redaction covers literal values. Encoded or otherwise transformed versions of a secret are not detected. ssh_clear_secrets also does not unset variables that have already been exported in a remote shell.
Closing a session terminates running processes associated with that session. Remote file reads return text and can be limited with a maximum byte setting for larger files. The automatic host-key policy is suitable for ephemeral lab or CI machines but should be considered carefully on untrusted networks; the README suggests using a VPN or SSH bastion with known host keys in those environments.
Factual signals from GitHub, npm, and our automated checks ā not a rating.
No reviews yet ā be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/faizbawa-mcp-remote-ssh)<a href="https://allmcps.com/mcp/faizbawa-mcp-remote-ssh"><img src="https://allmcps.com/api/badge/faizbawa-mcp-remote-ssh?style=directory" alt="MCP Remote Ssh on AllMCPs" /></a>