SSH

v1.0.0Cloud Servicesstable

Enables secure SSH connections to remote servers for executing shell commands and managing active sessions. It supports authentication via passwords or private keys and provides optional host-based access control.

aiai-toolsautomationcursordevops
Share:
64
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 ssh connections to remote servers for executing shell commands and managing active sessions. it supports authentication via passwords or private keys and provides optional host-based ac...

Enables secure SSH connections to remote servers for executing shell commands and managing active sessions. It supports authentication via passwords or private keys and provides optional host-based access control.

This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables secure SSH connections to remote servers for executi

Use Cases

Secure SSH to remote servers
Execute shell commands and manage sessions
atlcomgit

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-ssh

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

mcp-ssh is a TypeScript MCP server that enables AI assistants to establish and manage secure SSH connections to remote servers, execute shell commands within persistent sessions, and list or close active connections. It supports both password-based and private key authentication (inline or by file path), optional host allowlisting via MCP_SSH_ALLOWED_HOSTS, and configurable timeouts — making it suitable for DevOps automation, remote server management, and AI-driven infrastructure workflows.

Prerequisites

  • Node.js 18 or newer (for local setup) OR Docker with Docker Compose (for containerized deployment)
  • SSH access to the remote servers you want to manage (credentials or private key)
  • An MCP-compatible client such as Claude Desktop or Cursor
  • Git to clone the repository
1

Clone the repository

Clone the mcp-ssh repository to your local machine.

git clone https://github.com/atlcomgit/mcp-ssh.git
cd mcp-ssh
2

Create your environment file

Copy the example environment file and configure it. Set MCP_SSH_ALLOWED_HOSTS to a comma-separated list of permitted hostnames if you want to restrict which servers the AI can connect to.

cp .env.example .env
# Edit .env and optionally set:
# MCP_SSH_ALLOWED_HOSTS=server1.example.com,server2.example.com
3

Install dependencies and build

Install npm dependencies and build the TypeScript project.

npm install
npm run build
4

Run the server

Start the MCP server in development mode or as a built binary. The server communicates over stdio as required by the MCP protocol.

npm run dev
# or after build:
npm start
5

Configure your MCP client

Add the mcp-ssh server to your Claude Desktop configuration. The server runs via stdio, so no port forwarding is needed.

SSH Examples

Client configuration

Claude Desktop configuration for mcp-ssh, running the built Node.js binary with an optional host allowlist.

{
  "mcpServers": {
    "mcp-ssh": {
      "command": "node",
      "args": ["/path/to/mcp-ssh/dist/index.js"],
      "env": {
        "MCP_SSH_ALLOWED_HOSTS": "myserver.example.com,staging.example.com"
      }
    }
  }
}

Prompts to try

Use these prompts to connect to remote servers and run commands through the AI assistant.

- "Connect to myserver.example.com as user 'deploy' using my private key at ~/.ssh/id_rsa"
- "Run 'df -h' on the connected server and show me disk usage"
- "List all active SSH sessions"
- "Execute 'systemctl status nginx' in the /etc directory on session abc-123"
- "Run 'tail -n 50 /var/log/app.log' and summarize any errors you find"
- "Disconnect from the SSH session when done"

Troubleshooting SSH

Connection refused or timeout when using ssh_connect

Verify the target host and port are reachable from your machine with `ssh user@host`. Check firewall rules on the remote server. If using MCP_SSH_ALLOWED_HOSTS, ensure the hostname exactly matches one of the allowed entries.

Private key authentication fails

Ensure the private key path passed as privateKeyPath is correct and readable by the Node.js process. For inline keys (privateKey), the full PEM content must be provided. The remote server must have the corresponding public key in ~/.ssh/authorized_keys.

Command execution times out via ssh_exec

Increase the timeoutMs parameter when calling ssh_exec for long-running commands. For commands that produce continuous output (e.g., log tailing), break them into time-bounded invocations or use a specific line count with head/tail.

Frequently Asked Questions about SSH

What is SSH?

SSH is a Model Context Protocol (MCP) server that enables secure ssh connections to remote servers for executing shell commands and managing active sessions. it supports authentication via passwords or private keys and provides optional host-based access control. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install SSH?

Follow the installation instructions on the SSH GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

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 Cloud Services MCP Servers

Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

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

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