SSH Real MCP Server
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., "@SSH Real MCP Servercheck disk usage on prod-web-01"
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.
SSH Real MCP Server
A Model Context Protocol (MCP) server that enables SSH remote command execution by delegating entirely to the system ssh binary. This means ssh-agent, ProxyCommand, ~/.ssh/config, jump hosts, and every other OS-level SSH feature work out of the box — no Node.js crypto, no native addons.
How it works
Instead of implementing the SSH protocol in Node.js, this server spawns ssh as a child process and pipes the output back to the MCP client. Authentication, key discovery, and connection routing are handled by your OS, exactly as if you ran ssh yourself in a terminal.
Requirements: ssh must be installed and available in PATH (standard on macOS and Linux).
Related MCP server: terminal-mcp-server
Features
Zero auth config — uses your existing
ssh-agent,~/.ssh/config, and key files automaticallyProxyCommand / jump hosts — works natively, no special parameters needed
Connectivity test —
ssh_testtool to verify reachability before running commandsArgument injection protection — host and username are validated before being passed to
sshConfigurable timeout — commands are killed and an error is returned if they exceed the timeout
Detailed results: stdout, stderr, and exit code
Installation
From npm
npm install -g @danielecr/realssh-mcpFrom source
git clone https://github.com/danielecr/realssh-mcp.git
cd realssh-mcp
npm install
npm run buildVS Code / Copilot configuration
After installing the package globally, add the server to your MCP configuration. In VS Code, open the MCP config file via Command Palette → MCP: Open User Configuration and add:
{
"servers": {
"realssh": {
"type": "stdio",
"command": "realssh-mcp"
}
}
}Then run MCP: List Servers to verify the server is active.
Tools
ssh_execute
Execute a command on a remote server via SSH.
Parameters:
host(string, required): SSH server hostname or IP addresscommand(string, required): Command to execute on the remote serverusername(string, optional): SSH username. Defaults to the current OS userport(number, optional): SSH server port (default: 22)timeout(number, optional): Command timeout in milliseconds (default: 30000)agentForward(boolean, optional): Enable SSH agent forwarding-A(default: false)extraArgs(string[], optional): Extra SSH arguments (e.g.,["-o", "StrictHostKeyChecking=no"])
Example:
{
"host": "prod-web-01",
"command": "df -h"
}{
"host": "192.168.1.100",
"username": "deploy",
"command": "systemctl status nginx"
}ssh_test
Test SSH connectivity to a remote host (runs echo ok and checks the response).
Parameters:
host(string, required): SSH server hostname or IP addressusername(string, optional): SSH usernameport(number, optional): SSH server port (default: 22)extraArgs(string[], optional): Extra SSH arguments
Host configuration
Hosts, aliases, jump hosts, and identity files are configured in ~/.ssh/config — not in the MCP server. This is intentional: the OS ssh binary reads that file natively.
Example ~/.ssh/config:
Host prod
HostName prod.example.com
User deploy
ProxyJump bastion
Host bastion
HostName bastion.example.com
User admin
IdentityFile ~/.ssh/bastion_ed25519With the above config, "host": "prod" works with no extra parameters.
Security considerations
Commands are executed on remote systems with the privileges of the SSH user — ensure proper access controls on the remote side.
BatchMode=yesis set by default, preventing thesshprocess from hanging on interactive prompts.Host and username inputs are validated to prevent SSH option injection.
Command output may contain sensitive data; treat it accordingly.
License
MIT
Available Tools
2 toolsssh_executeA
Execute a command on a remote server via SSH and return the output. Uses the system SSH binary so ssh-agent, ProxyCommand, and ~/.ssh/config are honoured automatically.
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | SSH server hostname or IP address (e.g., 'dev234' or '192.168.1.100') | |
| port | No | SSH server port (default: 22) | |
| username | No | SSH username (e.g., 'username'). Defaults to the current OS user. | |
| command | Yes | Command to execute on the remote server | |
| timeout | No | Command timeout in milliseconds (default: 30000) | |
| agentForward | No | Enable SSH agent forwarding (default: false) | |
| extraArgs | No | Extra SSH arguments (e.g., ['-o', 'StrictHostKeyChecking=no']) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses that it uses the system SSH binary and honors ssh-agent, ProxyCommand, and config. However, missing details on error handling, stderr capture, exit codes, and output format beyond 'return the output'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler. The first sentence states purpose, the second adds important behavioral context. Efficiently structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema, yet the description does not specify the return format (stdout/stderr, exit code). Parameter description is covered, but output behavior is left vague, reducing completeness for a tool with 7 parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description does not add significant meaning beyond the parameter descriptions already present.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes a command via SSH and returns output. It distinguishes from the sibling ssh_test by focusing on command execution rather than connectivity testing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus ssh_test or alternatives. The description implies usage but lacks 'when not to use' or explicit context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ssh_testB
Test SSH connectivity to a remote host. Verifies that the system SSH binary can reach the host using the current agent/config.
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | SSH server hostname or IP address | |
| port | No | SSH server port (default: 22) | |
| username | No | SSH username. Defaults to the current OS user. | |
| extraArgs | No | Extra SSH arguments |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavior disclosure. It fails to specify what the test entails (e.g., does it attempt authentication?), what constitutes success or failure, and how errors are reported. The mention of 'current agent/config' is helpful but insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of two sentences with no unnecessary words. It is front-loaded with the primary purpose and follows with a clarifying statement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the absence of an output schema and annotations, the description should explain the return value and behavior on failure. It does not state whether the tool returns a boolean, throws an error, or provides diagnostic output, leaving the agent without critical usage context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents each parameter. The description adds minimal additional semantic value, merely restating the overall purpose. It does not elaborate on the meaning of extraArgs or username defaults beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: testing SSH connectivity and verifying reachability. It effectively distinguishes from the sibling tool ssh_execute by focusing on connectivity testing rather than command execution.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
While the description implies use for pre-execution connectivity checks, it lacks explicit guidance on when to use this tool versus ssh_execute or when not to use it. No prerequisites or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
ssh_execute and ssh_test have distinct purposes: executing a command vs. testing connectivity. There is no overlap, so an agent can easily choose the correct tool.
Both tools follow the consistent pattern ssh_verb with snake_case, making them predictable and easy to understand.
With only two tools, the server feels too sparse for an SSH utility. Common operations like file transfer, session management, or port forwarding are missing, making the set incomplete for many use cases.
The tool surface covers only command execution and connectivity testing, leaving major gaps such as file operations (scp/sftp), port forwarding, or interactive sessions. This is insufficient for a general-purpose SSH server.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Secure tunneling, reverse proxy and remote access for local applications.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables secure remote and local command execution via SSH, with session management and environment variable support.1363MIT
- AlicenseCqualityFmaintenanceEnables SSH remote command execution on remote machines with persistent connections, supporting automatic key discovery and connection pooling.230MIT
- AlicenseNot gradedqualityDmaintenanceEnables executing commands on remote SSH hosts, with full support for bastion/jump hosts and ~/.ssh/config, plus Slurm job management and rsync.3MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/danielecr/realssh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server