SSH

v1.5.0Developer Toolsstable

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

sshmcpmodel-context-protocolserverwindows
Share:
466
Stars
0
Downloads
0
Weekly
0/5

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

Execute remote commands securely over SSH with automatic authentication.
Diagnose connection issues and manage remote files via SFTP.
tufantunc

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.5.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y ssh-mcp

Manual Installation

npx -y ssh-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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_PASSWORD
2

Add 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_PASSWORD
3

Add 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"
      ]
    }
  }
}
4

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"
      ]
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "ssh-mcp-server": { "command": "npx", "args": ["-y", "ssh-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides