remote-ssh-mcp
Allows for establishing persistent SSH connections to Linux servers, enabling remote command execution, background process management, and file transfers via SFTP.
Allows for establishing persistent SSH connections to macOS servers, enabling remote command execution, background process management, and file transfers via SFTP.
Click on "Deploy 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-mcp connect to prod.example.com and check free disk space"
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
MCP server for persistent SSH sessions with native GUI credential prompts.
Features
🔗 Persistent Sessions - Connections survive across multiple commands
🔐 GUI Credential Prompts - Native dialogs on Linux/macOS/Windows
📁 File Transfer - Upload/download via SFTP
⏱️ Background Commands - Run long tasks without blocking
🔄 Session Reuse - Automatic connection pooling per host
🛡️ Secure - Per-process secrets, localhost-only helper
Installation
npm install -g remote-ssh-mcpQuick Start
Add to your MCP client config:
{
"mcpServers": {
"ssh": {
"command": "remote-ssh-mcp"
}
}
}That's it! Connect to servers and credentials will be prompted via native GUI.
Configuration
Environment Variables (Optional)
Skip GUI prompts by setting credentials:
{
"mcpServers": {
"ssh": {
"command": "remote-ssh-mcp",
"env": {
"SSH_USER": "deploy",
"SSH_PASSWORD": "secret"
}
}
}
}Host Config File (Optional)
Create ~/.ssh/mcp-hosts.json:
{
"defaults": { "username": "admin" },
"hosts": {
"prod.example.com": {
"username": "deploy",
"keyPath": "~/.ssh/deploy_key"
}
}
}Tools
Tool | Description |
| Connect to SSH server, returns session_id |
| Execute command (with optional background mode) |
| Read terminal output history |
| Close a session |
| List active sessions |
| Upload file via SFTP |
| Download file via SFTP |
Example Usage
1. ssh_connect(host="server.com", auth_mode="password")
→ { session_id: "abc-123", status: "connected" }
2. ssh_exec(session_id="abc-123", command="cd /app && git pull")
→ { stdout: "Already up to date.", exit_code: 0 }
3. ssh_exec(session_id="abc-123", command="npm run build", background=true)
→ { status: "running", pid: "12345" }
4. ssh_read_buffer(session_id="abc-123", lines=50)
→ { lines: ["Building...", "Done!"], total_buffered: 150 }GUI Requirements
For credential prompts:
Linux:
zenity(apt install zenity)macOS: Built-in (osascript)
Windows: Built-in (PowerShell)
Without GUI, use environment variables or config file.
Security
Credentials prompted via native OS dialogs
Never logged or written to disk
Per-process authentication tokens
Localhost-only credential helper
Sessions auto-expire after 15 min inactivity
License
MIT
Available Tools
7 toolslist_sessionsB
List all active SSH sessions.
Inputs: no named parameters.
scp_downloadC
Download a file from remote server via SFTP.
Inputs: session_id (required), remote_path (required), local_path (required).
scp_uploadC
Upload a local file to remote server via SFTP.
Inputs: session_id (required), local_path (required), remote_path (required).
ssh_connectA
Connect to a remote SSH server. Returns session_id for subsequent commands.
Inputs: host (required), auth_mode (required), port, username, +4 more.
ssh_disconnectC
Disconnect an SSH session.
Inputs: session_id (required).
ssh_execC
Execute a command on a connected SSH session.
Inputs: session_id (required), command (required), timeout_ms, background.
ssh_read_bufferC
Read recent terminal output from session buffer.
Inputs: session_id (required), lines.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose with no ambiguity: list_sessions manages session enumeration, ssh_connect/disconnect handle connection lifecycle, ssh_exec runs commands, ssh_read_buffer retrieves output, and scp_download/upload handle file transfers. The descriptions clearly differentiate between session management, command execution, and file operations.
All tools follow a consistent verb_noun pattern with clear prefixes: ssh_ for session/command operations, scp_ for file transfers, and list_ for enumeration. The naming is perfectly predictable and follows a logical convention throughout the set.
With 7 tools, this server is well-scoped for remote SSH operations. Each tool earns its place by covering essential functions: connection management, command execution, output reading, file transfer, and session listing. The count is neither too sparse nor bloated for the domain.
The toolset provides excellent coverage for core SSH workflows: connect, execute, read output, transfer files, and manage sessions. A minor gap exists in advanced session features like interactive shell handling or terminal resizing, but agents can work around this with ssh_exec. The surface supports most common remote operations without dead ends.
Related MCP Connectors
- browser-sshDeprecatedcom.browserssh
Scoped, audited SSH exec, sessions, and SFTP on your saved servers without exposing credentials
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Manage remote servers, SSH terminals, files, databases and proxies with scoped access and approvals.
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.