# mcp-remote-ssh

> mcp-remote-ssh is an open-source MCP server for ai models and llm tooling. MCP server giving AI agents SSH access with secret-redacted env variables and SFTP. It is available on CLI, Self-hosted, Linux, macOS and Windows.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/faizbawa/mcp-remote-ssh
- **GitHub stars:** 12
- **License:** MIT
- **Categories:** [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

Connects AI agents to remote machines over SSH, with persistent shell sessions, structured command results with exit codes, file transfer over SFTP and local port tunnels. Tools cover connecting with password, key or agent auth, running one-off commands, sudo, and driving an interactive shell.

The distinctive part is secret handling. Variables are read from a local .env file on the user's machine, injected into the remote session, and any matching value is replaced with *** in every tool response before it reaches the model. Commands are fed secrets over stdin so they do not appear in the process list on the remote host.

Optional session transcripts record executed commands and their output, with secrets redacted, and can be saved to a local file for audit or bug reproduction. Built on Paramiko and FastMCP, it is aimed at developers and QA or lab engineers who want agents working on servers without exposing credentials. The host key policy accepts unknown keys automatically, which suits ephemeral lab machines but should be considered on untrusted networks.

## Features

- **Persistent SSH sessions:** Connections stay open across calls, with an interactive shell that keeps working directory, environment and running processes.
- **Secret-redacted environment loading:** Values from a local env file are injected remotely and masked as *** in all tool output sent back to the model.
- **Structured command output:** Commands return stdout, stderr and the real exit code in a consistent format.
- **SFTP file transfer:** Upload, download, read, write and list remote files and directories.
- **Port forwarding:** Create, list and close SSH tunnels from local ports to remote ports.
- **Session transcript recording:** Optionally log executed commands and shell I/O in memory and save them to a local file.

## Good for

- Letting an AI agent run diagnostics or deploy steps on a lab or cloud server without seeing credentials
- Reproducing bugs by recording exactly what an agent executed on a test machine
- Uploading configuration files and reading logs from remote hosts during development
- Opening a database tunnel to a remote server for local tools

## Tools

From the tool list in its README, going by the names, 3 of 7 tools change data; 3 names don't say. From the server's own tool labels and tool names; not verified by us.

- `ssh_connect`: Connect with password, key, or agent auth; optional recording
- `ssh_execute` (name suggests: changes): Run a command and return stdout, stderr and exit code
- `ssh_sudo_execute` (name suggests: changes): Run a command with sudo elevation
- `ssh_load_env_file`: Load secrets from a local env file for redaction
- `ssh_upload_file` (name suggests: changes): Upload a local file to the remote host
- `ssh_download_file` (name suggests: reads): Download a remote file to the local machine
- `ssh_forward_port`: Create an SSH tunnel from local to remote

## FAQ

### How are secrets kept out of the AI model's context?

Values loaded from the local env file are replaced with *** in every tool response, including command output, shell reads and remote file reads, before the model sees them.

### Is session recording on by default?

No. Recording is off by default and can be enabled per session at connect time or later.

### Which authentication methods are supported?

Connections can use a password, a key, or SSH agent authentication.

### Are base64 or otherwise transformed secrets redacted?

No. Only literal matches of the loaded values are redacted.

### Is mcp-remote-ssh free?

Yes. mcp-remote-ssh is open source, so you can use and self-host it for free.

### What are the best alternatives to mcp-remote-ssh?

The closest alternatives to mcp-remote-ssh are Fast MCP Ssh, SSH MCP Server, Remote Ssh MCP, Ssh Client MCP Server and mcp-tmux.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [Fast MCP Ssh](https://ai-powered.com/mcp/fast-mcp-ssh): Fast MCP Ssh is an open-source MCP server for developer tools.
- [SSH MCP Server](https://ai-powered.com/mcp/ssh-mcp-server): SSH MCP Server is an open-source MCP server for developer tools.
- [Remote Ssh MCP](https://ai-powered.com/mcp/remote-ssh-mcp): Remote Ssh MCP is an open-source MCP server for developer tools.
- [Ssh Client MCP Server](https://ai-powered.com/mcp/ssh-client-mcp-server-2): Ssh Client MCP Server is an open-source MCP server for developer tools.
- [mcp-tmux](https://ai-powered.com/mcp/mcp-tmux-2): mcp-tmux is an open-source MCP server for developer tools.
- [MCP Ssh Manager](https://ai-powered.com/mcp/mcp-ssh-manager): MCP Ssh Manager is an open-source MCP server for developer tools.
- [pty-mcp](https://ai-powered.com/mcp/pty-mcp): pty-mcp is an open-source MCP server for developer tools.
- [2native SSH MCP Server](https://ai-powered.com/mcp/2native-ssh-mcp-server): 2native SSH MCP Server is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-remote-ssh
