SSH
Enables secure remote command execution and file operations over SSH/SFTP with automatic authentication resolution. Features built-in diagnostics that identify connection issues—such as stale host keys, unloaded agents, or permission errors—and provi
What is SSH?
SSH is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables secure remote command execution and file operations over ssh/sftp with automatic authentication resolution. features built-in diagnostics that identify connection issues—such as stale host key...
Enables secure remote command execution and file operations over SSH/SFTP with automatic authentication resolution. Features built-in diagnostics that identify connection issues—such as stale host keys, unloaded agents, or permission errors—and provi
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Enables secure remote command execution and file operations
Use Cases
Maintainer
Works with
Installation
NPM
npx -y ssh-mcpManual Installation
npx -y ssh-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use SSH
The SSH MCP Server enables Claude and other AI assistants to execute shell commands and perform file operations on remote Linux and Windows servers over SSH and SFTP, with support for password and private-key authentication, sudo elevation, and persistent root shells. Its built-in diagnostics detect common connection failures — stale host keys, unloaded SSH agents, permission errors — and surface actionable fixes rather than raw error codes.
Prerequisites
- Node.js 18 or later (for npx execution)
- SSH access to one or more remote servers with known hostname, username, and either a password or private key path
- Claude Code, Claude Desktop, or another MCP-compatible client
- Optional: sudo password if you need privileged command execution on the remote server
Test the connection from the command line
Before configuring Claude, verify that ssh-mcp can reach your server by running it directly with your credentials.
npx -y ssh-mcp --host=YOUR_HOST --user=YOUR_USER --password=YOUR_PASSWORDAdd to Claude Code via MCP add command
Register the SSH server in Claude Code, passing your connection details as flags.
claude mcp add --transport stdio ssh-mcp -- npx -y ssh-mcp -- --host=YOUR_HOST --user=YOUR_USER --password=YOUR_PASSWORDAdd to Claude Desktop configuration (password auth)
Open ~/Library/Application Support/Claude/claude_desktop_config.json and add the entry with your server details.
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y", "ssh-mcp",
"--host=192.168.1.10",
"--user=deploy",
"--password=s3cr3t",
"--port=22"
]
}
}
}Configure with SSH key authentication (alternative)
If you use key-based authentication, pass the path to your private key instead of a password.
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y", "ssh-mcp",
"--host=192.168.1.10",
"--user=deploy",
"--key=/Users/alice/.ssh/id_rsa"
]
}
}
}Restart Claude Desktop and verify
Relaunch Claude Desktop. Ask it to run 'ls -la' on the remote server to confirm the connection is working.
SSH Examples
Client configuration
Claude Desktop configuration for the SSH MCP server with password authentication and sudo support.
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": [
"-y", "ssh-mcp",
"--host=myserver.example.com",
"--user=ubuntu",
"--key=/Users/alice/.ssh/id_rsa",
"--sudoPassword=mySudoPass",
"--timeout=30000"
]
}
}
}Prompts to try
Remote server management tasks you can ask Claude once SSH MCP is connected.
- "Run 'df -h' on the remote server and tell me which partitions are running low on space."
- "Check the last 50 lines of /var/log/nginx/error.log on my server."
- "List all running processes sorted by CPU usage on the remote host."
- "Restart the nginx service on the remote server using sudo."
- "Show me the current memory usage on my remote Linux server."Troubleshooting SSH
Connection refused or timeout when connecting to the remote host
Verify the host is reachable with 'ping YOUR_HOST' and that the SSH port (default 22) is open. Check firewall rules on the remote server with 'sudo ufw status' or 'sudo iptables -L'.
Authentication fails with private key
Ensure the key file permissions are restricted: 'chmod 600 ~/.ssh/id_rsa'. Also confirm the corresponding public key is in ~/.ssh/authorized_keys on the remote server.
sudo-exec tool hangs and never returns
The sudo-exec tool has automatic timeout handling that kills hanging processes. If it consistently hangs, try setting a shorter --timeout value (e.g. --timeout=15000) or ensure sudoPassword is correct so the sudo prompt is answered automatically.
Frequently Asked Questions about SSH
What is SSH?
SSH is a Model Context Protocol (MCP) server that enables secure remote command execution and file operations over ssh/sftp with automatic authentication resolution. features built-in diagnostics that identify connection issues—such as stale host keys, unloaded agents, or permission errors—and provi It connects AI assistants to external tools and data sources through a standardized interface.
How do I install SSH?
Install via npm with the command: npx -y ssh-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with SSH?
SSH works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is SSH free to use?
Yes, SSH is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
SSH Alternatives — Similar Developer Tools Servers
Looking for alternatives to SSH? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up SSH in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use SSH?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.