ssh-mcp
ssh-mcp v4.0
Linuxホストおよびネットワークデバイスにわたる永続的なSSH作業のためのMCPサーバー。
機能
永続的なSSH接続(自動再接続付き)
安全な資格情報の保存(Windows Credential Manager経由)
ネットワークデバイス対応: Cisco IOS/IOS-XE/XR、MikroTik、FortiGate、Juniper
設定管理: ネットワークデバイス向けのバックアップ、リストア、差分
SFTP: アップロード、ダウンロード、リモートファイルの一覧表示
SSHトンネル: 永続的なポートフォワーディング
レート制限: デバイスの飽和を防止(コマンド間の最小間隔100ms)
スマート接続:
ssh_connect(alias='vps')を使用して保存済みの資格情報を自動的に読み込む
Related MCP server: SSH MCP Server
クイックスタート
1. サーバーを保存(一度だけ)
ssh_save_server(
alias='vps',
host='192.168.10.1',
username='sassogba',
password='your-password',
auto_connect=True # Auto-connect on startup
)2. 接続(シンプルモード)
ssh_connect(alias='vps') # Loads credentials from servers.json3. コマンドを実行
ssh_exec(alias='vps', command='df -h')
ssh_exec_sudo(alias='vps', command='systemctl restart nginx', sudo_password='...')v4.0の新機能
スマート接続モード
ssh_connectはエイリアスだけを受け取り、資格情報を自動的に読み込むようになりました毎回ホスト、ユーザー名、パスワードを指定する必要はありません
Claude Code統合の問題を修正
重要な修正
タイムアウト処理: 不完全なバッファを静かに返す代わりに、
TimeoutErrorを発生させるようになりましたレート制限: デバイスの飽和を防ぐため、ネットワークコマンド間の最小間隔は100ms
マジックナンバーの排除: シェル寸法に名前付き定数を使用
ドキュメント
完全な使用例を含む新しい
CLAUDE_CODE_USAGE.md設定用の新しい
CLAUDE_CODE_SETUP.md完全なバージョン履歴を含む新しい
CHANGELOG.md
セキュリティモデル
servers.json は機密性のないメタデータのみを保持します。シークレットはWindows Credential Managerの以下のようなターゲットに保存されます:
ssh-mcp:<alias>:passwordssh-mcp:<alias>:key_passphrase
ホストキーポリシー
strict: デフォルト。未知のホストキーを拒否(本番環境)auto_add: 未知のホストキーを受け入れる(ラボのみ)
ネットワークデバイス
対応デバイスタイプ:
cisco- Cisco IOS/IOS-XEcisco_xr- Cisco IOS-XRmikrotik- MikroTik RouterOSfortigate- FortiGate FortiOSjuniper- Juniper JunOSgeneric- Linux/Unix(デフォルト)
例: Ciscoバックアップ
# Save once
ssh_save_server(
alias='cisco-core',
host='10.0.0.1',
username='admin',
password='...',
device_type='cisco',
auto_connect=True
)
# Connect
ssh_connect(alias='cisco-core')
# Backup config
ssh_backup_config(alias='cisco-core', device_type='cisco')
# Saved to: backups/cisco-core/cisco-core_2026-05-31_14-30-00.txt
# Execute commands
ssh_exec_network(
alias='cisco-core',
commands=['show version', 'show ip interface brief'],
device_type='cisco'
)
# Push config
ssh_push_config(
alias='cisco-core',
config='''
interface GigabitEthernet0/1
description Uplink to Core
ip address 10.0.1.1 255.255.255.0
no shutdown
''',
device_type='cisco',
save_config=True
)Claude Codeでの使用
詳細な例については CLAUDE_CODE_USAGE.md を参照してください。
TL;DR:
1. Save: ssh_save_server(alias='vps', host='192.168.10.1', username='sassogba', password='...')
2. Connect: ssh_connect(alias='vps')
3. Execute: ssh_exec(alias='vps', command='df -h')利用可能な18のツール
接続管理
ssh_connect- 永続的なSSH接続を確立(スマートモード: エイリアスを指定するだけ)ssh_disconnect- 接続とトンネルを閉じるssh_list- ステータス付きでアクティブな接続を一覧表示
永続設定
ssh_save_server- サーバーを servers.json に保存(シークレットはCredential Managerに保存)ssh_remove_server- 保存済みサーバーを削除ssh_list_servers- 保存済みの全サーバーを一覧表示
Linux/Unixでの実行
ssh_exec- シェルコマンドを実行ssh_exec_sudo- sudoで実行(パスワードを自動注入)
ネットワークデバイスでの実行
ssh_exec_network- ネットワークデバイスでコマンドを実行(ページネーション、プロンプトを処理)ssh_push_config- 設定ブロックを適用ssh_backup_config- 実行中設定をローカルファイルにバックアップssh_restore_config- バックアップファイルから設定を復元ssh_diff_config- 設定を比較(gitスタイルの差分)
SFTP
ssh_upload- ファイルをリモートサーバーにアップロードssh_download- リモートサーバーからファイルをダウンロードssh_list_remote- リモートディレクトリの内容を一覧表示
トンネル
ssh_tunnel- 永続的なSSHトンネルを作成(ポートフォワーディング)ssh_close_tunnel- ラベルでトンネルを閉じる
アーキテクチャ
SSHPool: 自動再接続を備えたスレッドセーフな接続プール
SSHConnection: スレッドセーフティのためのRLockを備えた接続ごとの状態
ThreadPoolExecutor: 同期式のParamikoをラップするAsync/awaitラッパー
レートリミッター: デバイスの飽和を防ぐため、コマンド間の最小間隔は100ms
タイムアウト処理: 複数レベル(コマンドごと、合計、絶対)で、適切なエラー伝播を備える
要件
paramiko>=3.0.0
mcp>=1.0.0
pywin32>=306インストール:
pip install -r requirements.txtテストの実行
python -m pytest tests -vドキュメント
ライセンス
MIT
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 Servers
- AlicenseAqualityDmaintenanceEnables secure SSH connections to multiple remote servers with support for command execution, file transfers (SFTP), directory listing, and both password and key-based authentication.7MIT
- AlicenseAqualityDmaintenanceEnables remote server management through SSH and SFTP, supporting command execution, file transfers, and interactive shell sessions. It allows for multiple concurrent connections using either password or SSH key authentication.11143MIT
- AlicenseAqualityNot gradedmaintenanceEnables persistent SSH sessions and SFTP file transfers with native GUI credential prompts for secure remote server management. It supports background command execution, session pooling, and automatic connection reuse across multiple commands.7
- AlicenseAqualityAmaintenanceEnables remote server administration via SSH, supporting command execution, SFTP file transfers, and multi-profile management. It features security safeguards like destructive command detection and audit logging to ensure safe interaction with remote Linux/Unix environments.1713MIT
Related MCP Connectors
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Issue, rotate and revoke scoped API-key passes for 25+ providers — the agent never sees a real key
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/Steph-ux/ssh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server