ssh-mcp
ssh-mcp v4.0
MCP-Server für persistente SSH-Arbeit auf Linux-Hosts und Netzwerkgeräten.
Funktionen
Persistente SSH-Verbindungen mit automatischer Wiederverbindung
Sichere Speicherung von Anmeldedaten über Windows Credential Manager
Unterstützung für Netzwerkgeräte: Cisco IOS/IOS-XE/XR, MikroTik, FortiGate, Juniper
Konfigurationsverwaltung: Backup, Wiederherstellung und Diff für Netzwerkgeräte
SFTP: Hochladen, Herunterladen, Auflisten entfernter Dateien
SSH-Tunnel: persistente Portweiterleitung
Ratenbegrenzung: verhindert Gerätesättigung (mindestens 100 ms zwischen Befehlen)
Intelligente Verbindung: Verwenden Sie
ssh_connect(alias='vps'), um gespeicherte Anmeldedaten automatisch zu laden.
Related MCP server: SSH MCP Server
Schnellstart
1. Server speichern (einmalig)
ssh_save_server(
alias='vps',
host='192.168.10.1',
username='sassogba',
password='your-password',
auto_connect=True # Auto-connect on startup
)2. Verbinden (einfacher Modus)
ssh_connect(alias='vps') # Loads credentials from servers.json3. Befehle ausführen
ssh_exec(alias='vps', command='df -h')
ssh_exec_sudo(alias='vps', command='systemctl restart nginx', sudo_password='...')Neuerungen in v4.0
Modus für intelligente Verbindungen
ssh_connectakzeptiert jetzt nur einen Alias, um Anmeldedaten automatisch zu ladenKeine Notwendigkeit, jedes Mal Host, Benutzername und Passwort anzugeben
Behebt Integrationsprobleme mit Claude Code
Kritische Korrekturen
Timeout-Behandlung: Wirft jetzt
TimeoutError, anstatt stillschweigend unvollständige Puffer zurückzugebenRatenbegrenzung: Mindestens 100 ms zwischen Netzwerkbefehlen, um Gerätesättigung zu verhindern
Magische Zahlen eliminiert: Benannte Konstanten für Shell-Dimensionen
Dokumentation
Neue
CLAUDE_CODE_USAGE.mdmit vollständigen AnwendungsbeispielenNeue
CLAUDE_CODE_SETUP.mdfür die KonfigurationNeue
CHANGELOG.mdmit vollständiger Versionshistorie
Sicherheitsmodell
servers.json enthält nur nicht sensible Metadaten. Geheimnisse liegen im Windows Credential Manager unter Zielen wie:
ssh-mcp:<alias>:passwordssh-mcp:<alias>:key_passphrase
Host-Key-Richtlinie
strict: Standard, lehnt unbekannte Host-Keys ab (Produktion)auto_add: akzeptiert unbekannte Host-Keys (nur Labor)
Netzwerkgeräte
Unterstützte Gerätetypen:
cisco- Cisco IOS/IOS-XEcisco_xr- Cisco IOS-XRmikrotik- MikroTik RouterOSfortigate- FortiGate FortiOSjuniper- Juniper JunOSgeneric- Linux/Unix (Standard)
Beispiel: Cisco-Backup
# 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
)Verwendung mit Claude Code
Siehe CLAUDE_CODE_USAGE.md für detaillierte Beispiele.
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 verfügbare Tools
Verbindungsverwaltung
ssh_connect- Stellt eine persistente SSH-Verbindung her (intelligenter Modus: einfach Alias angeben)ssh_disconnect- Schließt Verbindung und Tunnelssh_list- Listet aktive Verbindungen mit Status auf
Persistente Konfiguration
ssh_save_server- Speichert Server in servers.json (Geheimnisse im Credential Manager)ssh_remove_server- Entfernt gespeicherten Serverssh_list_servers- Listet alle gespeicherten Server auf
Linux/Unix-Ausführung
ssh_exec- Führt Shell-Befehl ausssh_exec_sudo- Führt mit sudo aus (automatische Passworteingabe)
Ausführung auf Netzwerkgeräten
ssh_exec_network- Führt Befehle auf Netzwerkgeräten aus (verarbeitet Paginierung und Eingabeaufforderungen)ssh_push_config- Stellt Konfigurationsblock bereitssh_backup_config- Sichert laufende Konfiguration in lokale Dateissh_restore_config- Stellt Konfiguration aus Sicherungsdatei wieder herssh_diff_config- Vergleicht Konfigurationen (Diff im Git-Stil)
SFTP
ssh_upload- Lädt Datei auf entfernten Server hochssh_download- Lädt Datei von entferntem Server herunterssh_list_remote- Listet Inhalte des entfernten Verzeichnisses auf
Tunnel
ssh_tunnel- Erstellt persistenten SSH-Tunnel (Portweiterleitung)ssh_close_tunnel- Schließt Tunnel anhand der Bezeichnung
Architektur
SSHPool: Thread-sicherer Verbindungspool mit automatischer Wiederverbindung
SSHConnection: Zustand pro Verbindung mit RLock für Thread-Sicherheit
ThreadPoolExecutor: Async/await-Wrapper für Paramiko (das synchron ist)
Ratenbegrenzer: Mindestens 100 ms zwischen Befehlen, um Gerätesättigung zu verhindern
Timeout-Behandlung: Mehrere Ebenen (pro Befehl, gesamt, absolut) mit korrekter Fehlerweitergabe
Anforderungen
paramiko>=3.0.0
mcp>=1.0.0
pywin32>=306Installieren mit:
pip install -r requirements.txtTests ausführen
python -m pytest tests -vDokumentation
CHANGELOG.md - Versionshistorie und Migrationsanleitung
Lizenz
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