ssh-mcp
Allows managing Cisco network devices (IOS/IOS-XE/XR) over SSH, including executing commands, pushing configurations, and backing up or restoring device configurations.
Allows executing shell commands on remote Linux/Unix hosts via SSH, with support for sudo and persistent connections.
Allows managing MikroTik RouterOS devices over SSH, including executing commands, pushing configurations, and performing config backup and restore operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ssh-mcpcheck disk usage on my vps"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ssh-mcp v4.0
MCP server for persistent SSH work across Linux hosts and network devices.
Features
Persistent SSH connections with automatic reconnection
Secure credential storage via Windows Credential Manager
Network device support: Cisco IOS/IOS-XE/XR, MikroTik, FortiGate, Juniper
Config management: backup, restore, diff for network devices
SFTP: upload, download, list remote files
SSH tunnels: persistent port forwarding
Rate limiting: prevents device saturation (100ms minimum between commands)
Smart connection: use
ssh_connect(alias='vps')to load saved credentials automatically
Related MCP server: SSH MCP Server
Quick Start
1. Save a server (once)
ssh_save_server(
alias='vps',
host='192.168.10.1',
username='sassogba',
password='your-password',
auto_connect=True # Auto-connect on startup
)2. Connect (simple mode)
ssh_connect(alias='vps') # Loads credentials from servers.json3. Execute commands
ssh_exec(alias='vps', command='df -h')
ssh_exec_sudo(alias='vps', command='systemctl restart nginx', sudo_password='...')What's New in v4.0
Smart Connection Mode
ssh_connectnow accepts just an alias to load credentials automaticallyNo need to provide host, username, password every time
Fixes Claude Code integration issues
Critical Fixes
Timeout handling: Now raises
TimeoutErrorinstead of silently returning incomplete buffersRate limiting: 100ms minimum between network commands to prevent device saturation
Magic numbers eliminated: Named constants for shell dimensions
Documentation
New
CLAUDE_CODE_USAGE.mdwith complete usage examplesNew
CLAUDE_CODE_SETUP.mdfor configurationNew
CHANGELOG.mdwith full version history
Security Model
servers.json only keeps non-sensitive metadata. Secrets live in Windows Credential Manager under targets like:
ssh-mcp:<alias>:passwordssh-mcp:<alias>:key_passphrase
Host Key Policy
strict: default, rejects unknown host keys (production)auto_add: accepts unknown host keys (lab only)
Network Devices
Supported device types:
cisco- Cisco IOS/IOS-XEcisco_xr- Cisco IOS-XRmikrotik- MikroTik RouterOSfortigate- FortiGate FortiOSjuniper- Juniper JunOSgeneric- Linux/Unix (default)
Example: 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
)Usage with Claude Code
See CLAUDE_CODE_USAGE.md for detailed examples.
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 Tools Available
Connection Management
ssh_connect- Establish persistent SSH connection (smart mode: just provide alias)ssh_disconnect- Close connection and tunnelsssh_list- List active connections with status
Persistent Configuration
ssh_save_server- Save server to servers.json (secrets in Credential Manager)ssh_remove_server- Remove saved serverssh_list_servers- List all saved servers
Linux/Unix Execution
ssh_exec- Execute shell commandssh_exec_sudo- Execute with sudo (auto password injection)
Network Device Execution
ssh_exec_network- Execute commands on network devices (handles pagination, prompts)ssh_push_config- Deploy configuration blockssh_backup_config- Backup running config to local filessh_restore_config- Restore config from backup filessh_diff_config- Compare configs (git-style diff)
SFTP
ssh_upload- Upload file to remote serverssh_download- Download file from remote serverssh_list_remote- List remote directory contents
Tunnels
ssh_tunnel- Create persistent SSH tunnel (port forwarding)ssh_close_tunnel- Close tunnel by label
Architecture
SSHPool: Thread-safe connection pool with automatic reconnection
SSHConnection: Per-connection state with RLock for thread safety
ThreadPoolExecutor: Async/await wrapper for Paramiko (which is synchronous)
Rate limiter: 100ms minimum between commands to prevent device saturation
Timeout handling: Multiple levels (per-command, total, absolute) with proper error propagation
Requirements
paramiko>=3.0.0
mcp>=1.0.0
pywin32>=306Install with:
pip install -r requirements.txtRun Tests
python -m pytest tests -vDocumentation
CLAUDE_CODE_USAGE.md - Usage examples for Claude Code
CLAUDE_CODE_SETUP.md - Configuration guide
CHANGELOG.md - Version history and migration guide
License
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