SuperAPI AI Directory

ssh-mcp

SSH control for Linux and Windows servers: execute remote shell commands with password or SSH key authentication.

Open website

About this tool

SSH MCP Server v2 is a security-first Model Context Protocol server that provides LLM agents with controlled SSH access to remote hosts. It focuses on managing the security risks of giving shell access to LLMs, narrowing the risk scope by classifying commands before execution, authorizing based on a role and host group matrix, requiring human approval for destructive operations, and logging all decisions.

Key capabilities

  • Supports controlling Linux and Windows servers via password or SSH key authentication.
  • Provides one-off command execution, interactive sessions (preserving CWD and environment variables), and background sessions (for long-running processes).
  • Supports SFTP file transfer, including streaming and model-based transfer.
  • Built-in policy engine supporting role-based authorization, deny lists, command classification, and approval workflows.
  • Supports ProxyJump (accessing internal hosts through a bastion host) and SSH CA certificates.
  • Provides detailed audit logs and host-side identification (via the AI_AGENT environment variable).

Usage

  1. Create a configuration file; the path depends on the platform. Linux/macOS requires file permissions of 700; Windows requires appropriate ACL settings.
  2. Set credentials via environment variables; never pass passwords in command-line arguments.
  3. Connect from an MCP client (such as Claude Desktop, Cursor, Windsurf).
  4. The configuration file determines hosts, roles, and policy rules. An optional policy section can override the default matrix.

Applicable scenarios

  • Scenarios where AI agents need to securely manage remote servers (such as executing operations commands, deployments, and log viewing).
  • Scenarios in enterprise environments where internal hosts need to be accessed through a central SSH certificate authority or a bastion host.
  • Automated operations tasks that require strict auditing and approval workflows.

Limitations

  • Interactive sessions require a POSIX shell (sh, bash, ash, zsh) and do not support Windows' default cmd.exe.
  • File transfer tools are unavailable on Windows because the privacy of the transfer root directory cannot be verified.
  • Correct configuration is required to avoid exposing passwords in command-line arguments.
  • No version information is provided; the AI_AGENT environment variable serves only as an identifier and should not be used as a basis for authorization.
  • Some features (such as streaming file transfer) require configuringdefaults.transferRoot.
  • All tool calls will be rejected when not configured.