SM

shaike1/mcp-server-ssh

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

58 stars 16 forks 品質 56 トレンド 0

shaike1/mcp-server-ssh は [https://github.com/shaike1/mcp-server-ssh.] からインポートされた MCP サーバーの候補です

概要

shaike1/mcp-server-ssh は [https://github.com/shaike1/mcp-server-ssh.] からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

モデルコンテキストプロトコル(MCP)の強力なSSHサーバ実装。 このサーバーは、SSHプロトコルを介してリモートコマンドの実行とファイル操作をセキュアにし、パスワードとキーベースの認証の両方をサポートします。

##特徴

  • ✨セキュアSSH接続管理
  • パスワードとキーベースの認証
  • ◀ リモートコマンド実行
  • 📁 ファイル操作(アップロード/ダウンロード)
  • ファイル転送の進捗追跡
  • 🔐 許可管理
  • ディレクトリの操作
  • OSTバルクファイル転送
  • 詳細なログ

インストール

  1. パッケージを取付けて下さい:

  2. Claudeデスクトップコンフィグ(claude_desktop_config.json])に追加します。

使用法

パスワード認証

キー認証

コマンドを実行する

ファイル操作

ディレクトリ操作

開発

  1. リポジトリのクローン化:

  2. 依存関係を取付けて下さい:

  3. 造り:

4.サーバーを始めて下さい:

環境変数

  • [SSH_LOG_LEVEL: ログレベル(デフォルト:情報)

投稿

  1. リポジトリをフォークする
  2. 機能ブランチを作成する([git checkout -b feature/amazing-feature])
  3. 変更のコミット([git commit -m 'Add some amazing feature')

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP SSH Server

A powerful SSH server implementation for Model Context Protocol (MCP). This server enables secure remote command execution and file operations through SSH protocol, supporting both password and key-based authentication.

Features

  • ✨ Secure SSH connection management
  • 🔑 Password and key-based authentication
  • 💻 Remote command execution
  • 📁 File operations (upload/download)
  • 📊 Progress tracking for file transfers
  • 🔐 Permission management
  • 📂 Directory operations
  • 🚀 Bulk file transfers
  • 📝 Detailed logging

Installation

  1. Install the package:
npm install mcp-ssh
  1. Add to your Claude desktop config (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"
      }
    }
  }
}

Usage

Password Authentication

$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"

Key Authentication

$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"

Execute Commands

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

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

File Operations

# 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"

Directory Operations

# 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

Development

  1. Clone the repository:
git clone https://github.com/shaike1/mcp-server-ssh.git
cd mcp-server-ssh
  1. Install dependencies:
npm install
  1. Build:
npm run build
  1. Start server:
npm start

Environment Variables

  • SSH_PORT: Server port (default: 8889)
  • SSH_LOG_LEVEL: Logging level (default: info)

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "ssh": { "command": "node", "args": ["%APPDATA%/npm/node_modules/mcp-ssh/dist/server.js"], "env": { "SSH_PORT": "8889", "SSH_LOG_LEVEL": "info" } } } }