Simple SSH MCP Server
一个 MCP 服务器,为 AI 助手提供完整的 SSH/SFTP 远程操作功能——包括会话管理、命令执行、交互式 Shell、文件传输、端口转发和系统诊断。
适用于 Claude Desktop、VS Code + GitHub Copilot 以及任何兼容 MCP 的客户端。
软件包
软件包 | 描述 |
MCP 服务器(49 个工具)——独立 CLI 和 npm 包 | |
VS Code 扩展——自动向 GitHub Copilot 注册服务器 |
Related MCP server: ssh-mcp
功能特性
会话管理 — 通过密码或密钥认证进行连接/断开连接/ping 操作
命令执行 — 执行命令并捕获 stdout/stderr、超时设置和退出代码
Sudo 执行 — 通过 stdin 注入密码(从不记录日志)执行提权命令
后台作业 — 支持轮询和取消的长时运行命令
交互式 Shell — 支持读/写/调整大小的 PTY Shell
SFTP 操作 — 上传、下载、读取、写入、删除、列出、查看状态
端口转发 — 本地 (-L) 和远程 (-R) SSH 隧道
系统诊断 — 操作系统、CPU、内存、磁盘、网络、负载、进程信息
文件搜索与分析 — 查找文件、grep 内容、diff、tail、校验和
服务器管理 — 服务、进程、cron、网络诊断、用户管理
多主机工作流 — 广播命令、主机间文件传输、跳板机/堡垒机连接、脚本执行
会话智能 — 系统快照、快照差异对比、连接书签
容器感知 — Docker/Podman 容器的列表、日志、exec 操作
审计日志 — 带有过滤功能的 NDJSON 结构化日志
快速入门
独立运行 (npm)
npm install -g simple-ssh-mcp-serverClaude Desktop
添加到 claude_desktop_config.json:
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": ["ssh-mcp-server"],
"env": {
"SSH_MCP_MAX_CONNECTIONS": "10",
"SSH_MCP_HOST_KEY_MODE": "accept"
}
}
}
}VS Code + GitHub Copilot
安装 SSH MCP VS Code 扩展 —— 服务器会在 VS Code 启动时自动运行。需要 VS Code 1.99+ 和 GitHub Copilot。
工具 (49)
类别 | 工具 |
会话 |
|
执行 |
|
后台 |
|
Shell |
|
SFTP |
|
端口转发 |
|
文件搜索 |
|
服务器管理 |
|
多主机 |
|
会话智能 |
|
容器 |
|
诊断 |
|
配置
所有设置均通过环境变量进行:
变量 | 默认值 | 描述 |
|
| 最大并发 SSH 会话数 |
|
| 审计日志目录 |
|
| PTY Shell 的默认 TERM |
|
| 终端宽度 |
|
| 终端高度 |
|
| 命令超时时间 (ms) |
|
| 主机密钥模式: |
|
|
|
请参阅 服务器 README 获取完整的配置参考。
安全性
Sudo 密码通过 stdin 注入,从不记录日志
从输出中剥离 ANSI 转义序列
输出截断防止内存溢出
SSH keepalive 检测死连接
CI 中集成了 ESLint 安全插件 + Gitleaks + CodeQL + Trivy
许可证
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server for AI.TV creators — delegate account operations to your AI agent over MCP.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server giving AI agents full SSH access with persistent sessions, structured command output, SFTP file transfer, and port forwarding.1810MIT
- AlicenseAqualityCmaintenanceAn MCP server that gives AI agents SSH access to remote machines through your local OpenSSH client, enabling remote command execution, file transfer, persistent shell sessions, and port forwarding.1716MIT
- AlicenseNot gradedqualityAmaintenanceMCP server enabling AI assistants to securely operate remote servers via persistent SSH sessions, with tools for command execution, file transfer, directory listing, and system monitoring.4MIT
- AlicenseAqualityAmaintenanceAn open MCP server that gives any AI agent SSH access to remote Linux/Unix machines — shell commands, file read/write, and SFTP transfers.11MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bhayanak/ssh-server-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server