Token导航 LogoToken导航TokenDH.com
MCP Server Ssh logo
安全风控未说明官方级别未说明来源级核验

MCP Server Ssh

MCP Server

MCP SSH Server是一个基于SSH协议的远程命令执行和文件操作服务,支持密码和密钥认证,适用于需要安全远程管理的场景。

工具数

0

提示词数

0

GitHub Stars

55

资源数

0
安全认证TypeScriptClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

shaike1

提供方

shaike1

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

MCP SSH服务器

用于模型上下文协议(MCP)的强大SSH服务器实现。此服务器通过SSH协议实现安全的远程命令执行和文件操作,支持基于密码和密钥的身份验证。

特性

  • ✨ 安全SSH连接管理
  • 🔑 基于密码和密钥的身份验证
  • 💻 远程命令执行
  • 📁 文件操作(上传/下载)
  • 📊 文件传输的进度跟踪
  • 🔐 权限管理
  • 📂 目录操作
  • 🚀 批量文件传输
  • 📝 详细日志记录

安装

  1. 安装软件包:
npm install mcp-ssh
  1. 添加到您的Claude桌面配置(claude_desktop_config.json):
{
  "mcpServers": {
    "ssh": {
      "command": "node",
      "args": ["%APPDATA%/npm/node_modules/mcp-ssh/dist/server.js"],
      "env": {
        "SSH_PORT": "8889",
        "SSH_LOG_LEVEL": "info"
      }
    }
  }
}

用法

密码验证

$body = @{
    id = "test"
    host = "example.com"
    port = 22
    username = "user"
    password = "pass123"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/connect" -Method Post -Body $body -ContentType "application/json"

密钥验证

$body = @{
    id = "test"
    host = "example.com"
    port = 22
    username = "user"
    privateKey = Get-Content ~/.ssh/id_rsa | Out-String
    passphrase = "optional-key-passphrase"  # if your key is protected
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/connect" -Method Post -Body $body -ContentType "application/json"

执行命令

$execBody = @{
    id = "test"
    command = "ls -la"
} | ConvertTo-Json

Invoke-RestMethod -Uri "http://localhost:8889/exec" -Method Post -Body $execBody -ContentType "application/json"

文件操作

# Upload file
$uploadForm = @{
    file = Get-Item -Path "localfile.txt"
    remotePath = "/remote/path/file.txt"
}
Invoke-RestMethod -Uri "http://localhost:8889/upload/test" -Method Post -Form $uploadForm

# Download file
Invoke-RestMethod -Uri "http://localhost:8889/download/test?remotePath=/remote/path/file.txt" -Method Get -OutFile "downloaded.txt"

目录操作

# List directory
Invoke-RestMethod -Uri "http://localhost:8889/ls/test?path=/remote/path" -Method Get

# Get connection status
Invoke-RestMethod -Uri "http://localhost:8889/status/test" -Method Get

发展

  1. 克隆存储库:
git clone https://github.com/shaike1/mcp-server-ssh.git
cd mcp-server-ssh
  1. 安装依赖项:
npm install
  1. 构建:
npm run build
  1. 启动服务器:
npm start

环境变量

  • SSH_PORT:服务器端口(默认值:8889)
  • SSH_LOG_LEVEL:日志记录级别(默认值:info)

贡献

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add some amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

麻省理工学院

目录标签

目录标签

安全认证TypeScriptClaudeSSH服务本地部署远程命令执行文件传输远程管理

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明noneremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP