Skip to main content
Glama

MCP SSH Server

by shaike1

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. プルリクエストを開く

ライセンス

マサチューセッツ工科大学

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

パスワードとキーベースの認証の両方をサポートし、リモート コマンド実行とファイル操作を可能にする、モデル コンテキスト プロトコル用の安全な SSH サーバー実装。

  1. 特徴
    1. インストール
      1. 使用法
        1. パスワード認証
        2. キー認証
        3. コマンドを実行する
        4. ファイル操作
        5. ディレクトリ操作
      2. 発達
        1. 環境変数
          1. 貢献
            1. ライセンス

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A secure terminal execution server that enables controlled command execution with security features and resource limits via the Model Context Protocol (MCP).
                Last updated -
                1
                12
                1
                JavaScript
                MIT License
                • Apple
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.
                Last updated -
                2
                Python
                MIT License
                • Apple
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server implementation that enables secure remote command execution via SSH, with features for managing and using SSH credentials.
                Last updated -
                5
                3
                JavaScript
              • -
                security
                -
                license
                -
                quality
                A secure server that implements the Model Context Protocol (MCP) to enable controlled execution of authorized shell commands with stdin support.
                Last updated -
                Python

              View all related MCP servers

              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/shaike1/mcp-server-ssh'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server