Ssh MCP 2e436756

MCP安全风控

提供方 frah

安全风控 未标注 无需鉴权 社区 / 第三方 Claude

一个通过SSH安全控制Linux和Windows服务器的模型上下文协议(MCP)服务,支持远程命令执行、文件传输和多服务器连接管理。

一句话选型结论

按资料字段整理

Ssh MCP 2e436756 属于安全风控类 MCP 服务器,传输方式未标注,无需鉴权,可直接接入 Claude,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类安全风控 传输方式未标注 鉴权无需鉴权 部署方式未标注
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 4 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

安全风控
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量4暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

SSH管理TypeScript本地部署远程控制服务器运维文件传输安全协议

安装与配置

未标注 无需鉴权
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 4 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
资产与漏洞排查

盘点资产、扫漏洞、看暴露面。

日志与审计

汇总日志、查异常行为。

合规检查

按规则检查配置与权限是否合规。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 4 个工具,职责相对集中,接入后不容易误操作。
  • 已适配 Claude,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在安全风控场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Ssh MCP 2e436756当前 4 未标注 未标注 无 2026-05-17
Cyber Strike AI 75 未标注 未标注 无 2026-05-17
mcp-for-beginners 未标注 stdio · 本地进程 本地部署 有 2026-04-13
casdoor 未标注 stdio · 本地进程 本地部署 有 2026-04-12
kubeshark 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Modelcontextprotocol C22988b0 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

安全风控
字段来自项目仓库与公开索引,中文说明由本站标注
提供方frah上游标注的维护方 frah
分类安全风控本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

12.2 KB
来自项目仓库与上游目录的原文,未做删改

SSH MCP Server

A Model Context Protocol (MCP) server that provides secure SSH control for Linux and Windows servers. Execute remote shell commands, transfer files, and manage multiple server connections through a standardized MCP interface.

Features

  • Multiple Authentication Methods: Password and SSH key authentication
  • Multi-hop SSH Support: Connect through multiple jump hosts/bastions
  • File Operations: Upload and download files via SFTP
  • Security Controls: Command whitelist/blacklist configuration
  • Connection Pooling: Efficient connection management and reuse
  • TypeScript: Full type safety and modern JavaScript features
  • Bun Runtime: Fast execution and built-in TypeScript support

Installation

Prerequisites

  • Bun runtime installed
  • Node.js 18+ (for compatibility)

Quick Start (using bunx)

Run directly without installation:```bash

Generate example config file

bunx @frah/ssh-mcp --example-config > config.json

Run with default config (./config.json)

bunx @frah/ssh-mcp

Run with custom config file

bunx @frah/ssh-mcp --config /path/to/your/config.json

Show help

bunx @frah/ssh-mcp --help


### Local Setup

1. Clone the repository:```bash
git clone https://github.com/frah/ssh-mcp.git
cd ssh-mcp
  1. Install dependencies:```bash
    bun install

3. Copy and configure the example config:```bash
cp config.example.json config.json
# Edit config.json with your server details

Configuration

Create a config.json file based on the provided example:```json
{
"connections": [
{
"id": "dev-server",
"host": "192.168.1.100",
"port": 22,
"username": "developer",
"password": "your-password",
"description": "Development environment server",
"commandWhitelist": ["^ls", "^cat", "^grep"],
"timeout": 30000
},
{
"id": "prod-server",
"host": "prod.example.com",
"username": "admin",
"privateKeyPath": "/path/to/key",
"commandBlacklist": ["^rm", "^dd"]
}
],
"globalSettings": {
"maxConnections": 10,
"defaultTimeout": 30000,
"idleTimeout": 60000
}
}


### Connection Configuration Options

- `id`: Unique identifier for the connection
- `host`: Server hostname or IP address
- `port`: SSH port (default: 22)
- `username`: SSH username
- `password`: Password authentication (optional)
- `privateKey`: Private key content as string (optional)
- `privateKeyPath`: Path to private key file (optional)
- `passphrase`: Private key passphrase (optional)
- `description`: Human-readable description of the connection (optional)
- `proxy`: Array of proxy configurations for multi-hop connections
- `commandWhitelist`: Regex patterns for allowed commands
- `commandBlacklist`: Regex patterns for blocked commands
- `timeout`: Command execution timeout in milliseconds

### Global Settings Options

- `defaultTimeout`: Default command execution timeout in milliseconds
- `maxConnections`: Maximum number of concurrent SSH connections
- `idleTimeout`: SSH connection idle timeout in milliseconds (default: 60000)
- `commandWhitelist`: Global regex patterns for allowed commands
- `commandBlacklist`: Global regex patterns for blocked commands

### Multi-hop SSH Configuration

For connections through bastion hosts:```json
{
  "id": "internal-server",
  "host": "10.0.1.50",
  "username": "app-user",
  "privateKeyPath": "/path/to/key",
  "proxy": [
    {
      "host": "bastion.example.com",
      "username": "bastion-user",
      "privateKeyPath": "/path/to/bastion/key"
    }
  ]
}

Usage

Running the Server

Using bunx (No Installation Required)```bash

Run with default config (./config.json)

bunx @frah/ssh-mcp

Run with custom config file

bunx @frah/ssh-mcp --config /path/to/your/config.json


#### From Source

Start the MCP server (Bun natively supports TypeScript):```bash
bun run dev
# or directly
bun src/index.ts

Production Build

For production deployment with Node.js:```bash
bun run build
node dist/index.js


### Command Line Options

- `-c, --config `: Specify path to configuration file (default: `./config.json`)
- `-h, --help`: Show help message
- `-v, --version`: Show version number
- `--example-config`: Output example configuration JSON to stdout

**Examples:**```bash
ssh-mcp                                    # Start with default config
ssh-mcp --config /etc/ssh-mcp/config.json # Use custom config path
ssh-mcp --example-config > config.json    # Generate config file
ssh-mcp --help                            # Show help information
ssh-mcp --version                         # Show version

Available MCP Tools

1. ssh_execute

Execute commands on remote servers.

Parameters:
- connectionId (string): Connection ID from config
- command (string): Command to execute
- timeout (number, optional): Timeout in milliseconds

Example:```json
{
"tool": "ssh_execute",
"arguments": {
"connectionId": "dev-server",
"command": "ls -la /var/log",
"timeout": 5000
}
}


#### 2. ssh_upload
Upload files to remote server via SFTP.

**Parameters:**
- `connectionId` (string): Connection ID from config
- `localPath` (string): Local file path
- `remotePath` (string): Remote destination path

**Example:**```json
{
  "tool": "ssh_upload",
  "arguments": {
    "connectionId": "dev-server",
    "localPath": "/local/file.txt",
    "remotePath": "/remote/file.txt"
  }
}

3. ssh_download

Download files from remote server via SFTP.

Parameters:
- connectionId (string): Connection ID from config
- remotePath (string): Remote file path
- localPath (string): Local destination path

Example:```json
{
"tool": "ssh_download",
"arguments": {
"connectionId": "dev-server",
"remotePath": "/remote/log.txt",
"localPath": "/local/log.txt"
}
}


#### 4. ssh_list_servers
List all configured SSH server definitions.

**Parameters:**
None

**Returns:**
Array of server configurations with:
- `id`: Connection identifier
- `host`: Server hostname
- `port`: SSH port number
- `username`: SSH username
- `description`: Human-readable description (if configured)

**Example:**```json
{
  "tool": "ssh_list_servers",
  "arguments": {}
}

Response Example:```json
[
{
"id": "dev-server",
"host": "192.168.1.100",
"port": 22,
"username": "developer",
"description": "Development environment server"
},
{
"id": "prod-server",
"host": "prod.example.com",
"port": 22,
"username": "admin",
"description": ""
}
]


## Security Features

### Command Filtering

The server supports both whitelist and blacklist patterns for commands:

- **Whitelist**: Only commands matching these patterns are allowed
- **Blacklist**: Commands matching these patterns are blocked
- Patterns are evaluated as regular expressions
- Connection-specific rules override global rules

### Built-in Dangerous Command Protection

The following dangerous commands are always blocked:
- `rm -rf /` and variants
- Disk formatting commands
- Fork bombs
- Direct disk write operations

### Path Sanitization

All file paths are automatically sanitized to prevent directory traversal attacks.

## Claude Code Integration

To use this MCP server with Claude Code, follow these steps:

### 1. Configure Claude Code

Add the MCP server to your Claude Code configuration file:

**Configuration File Location:**

**Option A: Global Configuration**
- **Linux/macOS**: `~/.claude.json`
- **Windows**: `%USERPROFILE%\.claude.json`

**Option B: Project-Specific Configuration**
Create `.claude/settings.local.json` in your project directory.

**Configuration Example:**

**Using bunx (Recommended - No Installation Required):**```json
{
  "mcpServers": {
    "ssh-mcp": {
      "command": "bunx",
      "args": ["@frah/ssh-mcp", "--config", "/absolute/path/to/your/config.json"]
    }
  }
}

Using Local Installation:```json
{
"mcpServers": {
"ssh-mcp": {
"command": "bun",
"args": ["run", "/absolute/path/to/ssh-mcp/src/index.ts", "--config", "/absolute/path/to/your/config.json"]
}
}
}


**Example for Windows:**```json
{
  "mcpServers": {
    "ssh-mcp": {
      "command": "bunx",
      "args": ["@frah/ssh-mcp", "--config", "C:\\Users\\YourName\\ssh-mcp-config.json"]
    }
  }
}

Important Notes:
- When using bunx, you only need to specify the config file path
- The config file path in --config must be absolute, not relative
- bunx will automatically download and run the latest version of ssh-mcp

2. Create Configuration File

Ensure you have a config.json file in the ssh-mcp directory:```bash
cd /absolute/path/to/ssh-mcp
cp config.example.json config.json

Edit config.json with your server details


### 3. Verify Configuration

You can verify the MCP server is properly configured by running:```bash
# Test the server directly
bun run /absolute/path/to/ssh-mcp/src/index.ts

# Or inside Claude Code, use the slash command
/mcp

If the server starts successfully, you should see log messages indicating the server is running.

4. Restart Claude Code

After configuring the MCP server, restart Claude Code to load the new configuration.

5. Usage in Claude Code

Once configured, you can use the SSH tools in Claude Code conversations:

Example commands:
- "Show me the list of available SSH servers"
- "Execute ls -la on my development server"
- "Upload the local file app.log to /var/log/app.log on production"
- "Download /etc/nginx/nginx.conf from the web server to my local machine"

With the ssh_list_servers tool, Claude can automatically discover available connections and select the appropriate server based on your natural language description.

Alternative: Using Node.js

If you prefer to use Node.js instead of Bun, you need to first build the project:```bash
bun run build


Then configure it as:```json
{
  "mcpServers": {
    "ssh-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/ssh-mcp/dist/index.js", "--config", "/absolute/path/to/your/config.json"]
    }
  }
}

Notes:
- Replace /absolute/path/to/ssh-mcp with the full absolute path to your ssh-mcp directory
- Make sure Node.js 18+ is installed and run bun install to install dependencies
- The --config parameter is optional if your config.json is in the ssh-mcp directory

Environment Variables

  • LOG_LEVEL: Set logging level (debug, info, warn, error)
  • LOG_FILE: Path to log file (optional)

Example:```bash
LOG_LEVEL=debug LOG_FILE=ssh-mcp.log bun run dev


## Development

### Project Structure```
ssh-mcp/
├── src/
│   ├── index.ts           # MCP server entry point
│   ├── ssh/
│   │   └── connection.ts  # SSH connection management
│   ├── tools/
│   │   ├── execute.ts     # Command execution
│   │   └── file.ts        # File operations
│   ├── security/
│   │   └── validator.ts   # Security validation
│   ├── config/
│   │   └── manager.ts     # Configuration management
│   └── utils/
│       └── logger.ts      # Logging utilities
├── tests/                 # Test files
├── config.example.json    # Example configuration
└── package.json

Running Tests```bash

bun test


### Type Checking```bash
bun run lint

Troubleshooting

MCP Configuration Issues

  1. "No MCP servers configured":
    - Check file path in configuration is absolute, not relative
    - Verify .claude.json file location and JSON syntax
    - Make sure Bun is installed and in PATH

  2. Server not starting:
    - Test the command manually: bun run /full/path/to/ssh-mcp/src/index.ts
    - Check for TypeScript compilation errors
    - Verify all dependencies are installed: bun install

Connection Issues

  1. Authentication Failed: Check username/password or key file permissions
  2. Connection Timeout: Verify network connectivity and firewall rules
  3. Key Permission Error: Ensure private key has 600 permissions

Command Execution Issues

  1. Command Blocked: Check whitelist/blacklist configuration
  2. Timeout Error: Increase timeout value in config or command
  3. Permission Denied: Verify user has necessary permissions on remote server

Debug Mode

Enable debug logging for troubleshooting:bash LOG_LEVEL=debug bun run dev

License

MIT

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
Ssh MCP 2e436756 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Ssh MCP 2e436756 怎么在 Claude 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Ssh MCP 2e436756 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Ssh MCP 2e436756 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Ssh MCP 2e436756 支持哪些客户端?

资料标注支持 Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Ssh MCP 2e436756 能提供哪些能力?

资料显示约 4 个工具;能力标签包括 安全协议、TypeScript、Claude。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。