remote-ssh-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@remote-ssh-mcpcheck disk space usage on the remote server"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
remote-ssh-mcp
Generic MCP server for connecting an MCP client to a remote Linux or Unix host over SSH.
It provides remote shell commands, directory listing, text and binary file access, SSH
port forwarding, and VS Code Remote-SSH URI generation. The server runs locally and
reuses the OpenSSH installation, configuration, keys, agents, and ProxyJump settings
already available on the user's machine.
Requirements
Node.js 20 or newer
OpenSSH client available as
sshSSH public-key authentication configured for the target host
A local MCP client that supports stdio servers
Verify SSH before configuring the MCP client:
ssh 192.0.2.10 "hostname && whoami && pwd"If your SSH setup needs a username or a non-default port, use the environment variables
shown below or configure them in ~/.ssh/config.
Related MCP server: TermSSH MCP
Install From Source
git clone https://github.com/bbt567/remote-ssh-mcp.git
cd remote-ssh-mcp
npm install
npm run buildThe repository does not store SSH passwords, private keys, or tokens.
MCP Client Configuration
Set SSH_HOST to the server IP address. SSH_USER and SSH_PORT are optional:
{
"mcpServers": {
"remote-ssh": {
"command": "node",
"args": [
"C:\\path\\to\\remote-ssh-mcp\\dist\\index.js"
],
"env": {
"SSH_HOST": "192.0.2.10",
"SSH_USER": "ubuntu",
"SSH_PORT": "22"
}
}
}
}If the local SSH configuration already defines the user and port, only SSH_HOST is
needed. A host alias, hostname, or user@host value is also accepted.
REMOTE_SSH_* variables are supported as the explicit namespaced equivalents. When
both forms are present, REMOTE_SSH_* takes precedence.
Tools
remote_ssh_check: Check the SSH connection and return remote identity details.remote_ssh_local_diagnostics: Inspect the local OpenSSH environment and connection.remote_ssh_exec: Run a shell command with optional working directory and environment.remote_ssh_list_dir: List a remote directory withls -la.remote_ssh_read_text: Read a remote text file with a byte limit.remote_ssh_read_file_base64: Read a small remote binary file as base64.remote_ssh_write_text: Write UTF-8 text to a remote file.remote_ssh_write_file_base64: Decode base64 and write a remote file.remote_ssh_start_port_forward: Start a local SSH-Lport forward.remote_ssh_list_port_forwards: List port forwards created by this process.remote_ssh_stop_port_forward: Stop a port forward created by this process.remote_ssh_uri: Generate a VS Code Remote-SSH URI and CLI command.
Every remote tool accepts an optional host field that overrides the configured target
for that call. The command and file-write tools are intentionally powerful; review
tool calls before approving them in your MCP client.
Environment Variables
Variable | Default | Description |
| none | Default hostname, alias, or IP address |
| OpenSSH default | Username added to |
| OpenSSH default | SSH TCP port |
| platform OpenSSH | SSH executable path |
| none | Namespaced equivalent of |
| OpenSSH default | Namespaced equivalent of |
| OpenSSH default | Namespaced equivalent of |
| platform OpenSSH | Namespaced equivalent of |
|
| Default command timeout |
|
| Default captured bytes per output stream |
Development
npm run typecheck
npm run build
npm run devThe MCP server uses stdio. Logs are written to stderr so the MCP protocol stream remains clean.
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bbt567/remote-ssh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server