Back to MCP Directory
SSH
Model Context Protocol high risk

SSH

SSH MCP Server enables secure remote shell command execution on Linux/Windows systems via SSH, integrating with LLMs and other MCP clients.

Connections & Capabilities

Connects To

GitHub

Capabilities

execadmin

Quickstart

Config

{
    "mcpServers": {
        "ssh-mcp": {
            "command": "npx",
            "args": [
                "ssh-mcp",
                "-y",
                "--",
                "--host=1.2.3.4",
                "--port=22",
                "--user=root",
                "--password=pass",
                "--key=path/to/key"
            ]
        }
    }
}

Exposed MCP Tools (2)

critical
exec

Executes a shell command on the remote server.

Allows arbitrary shell command execution.

critical
sudo-exec

Executes a shell command on the remote server with sudo privileges.

Allows arbitrary shell command execution with elevated privileges.

Safety Assessment

This server allows remote execution of shell commands, posing a significant risk if misconfigured or compromised. It is relatively safe if sudo is disabled, strong passwords/keys are used, and command timeouts are short. It is risky if sudo is enabled with weak passwords, no command length limits, and long timeouts.

  • Configurable timeout protection aborts long-running processes.
  • Max command length limits prevent excessively large commands.
  • Sudo execution can be disabled if not needed.
  • Uses SSH for secure communication.
  • Executes arbitrary shell commands on a remote system.
  • Requires SSH credentials (password or key) to be stored.
  • Sudo access, if enabled, elevates privileges.
  • Vulnerable if the underlying SSH server is compromised.
  • No built-in command whitelisting or input sanitization.