ssh-admin
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-adminRun uptime on prod-web"
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-admin
MCP (Model Context Protocol) server for managing SSH connections to remote servers. Provides host registry, session pool, and secure command execution with read-only protection.
Features
Server Registry: Add, list, update, delete SSH server configurations with mtime-based caching
Connection Pool: Automatic session deduplication (max 1 per host), graceful reconnect
Command Execution: Run shell commands on active SSH sessions with whitelist + write pattern detection
Raw Command Execute: Unfiltered command execution with changelog logging and user approval
Readonly Mode: Optional strict read-only mode that blocks all write operations and registry mutations
Secure Credentials: Passwords stored in environment variables, never in the registry
Graceful Shutdown: SIGTERM/SIGINT handling with clean session teardown
Related MCP server: MCP SSH Tools Server
Installation
npm install
npm run buildConfiguration
Adding Servers
Use the registry_add_server tool to add servers:
{
"name": "registry_add_server",
"arguments": {
"alias": "prod-web",
"host": "192.168.1.100",
"port": 22,
"username": "deploy",
"authMethod": "key",
"keyPath": "~/.ssh/id_ed25519"
}
}For password auth:
{
"name": "registry_add_server",
"arguments": {
"alias": "staging-db",
"host": "10.0.0.50",
"port": 2222,
"username": "admin",
"authMethod": "password"
}
}Then set the password via environment variable:
export SSH_PASSWORD_STAGING_DB="your_password_here"Running the Server
# Development mode
npm run dev
# Production mode
npm run build && npm start
# Readonly mode (blocks registry writes + all command modifications)
MCP_SSH_READONLY=true npm run devMCP Tools
Registry Tools
Tool | Description |
| Add a new SSH server to the registry |
| List all registered servers (credentials hidden) |
| Get details of a specific server |
| Update server properties (cannot change host/port) |
| Remove a server from the registry |
Connection Tools
Tool | Description |
| Open an SSH connection, returns sessionId |
| Close an open SSH session |
| List all active sessions |
Command Tools
Tool | Description |
| Execute command on an open session (whitelist + write pattern protected) |
| Execute commands without filtering (changelog logging + user approval required) |
| Returns system prompt / agent instructions (call first) |
Usage Flow
1. instruction → get agent instructions
2. registry_list_servers → see available hosts
3. connection_open(alias="prod") → get sessionId
4. command_execute(sessionId, "uptime") → run first command
5. command_execute(sessionId, "df -h") → run second command on same session
6. command_execute_raw(sessionId, "systemctl restart nginx") → modify system
7. connection_close(sessionId) → close session~/server-info/ Structure
Each server has persistent information stored in its ~/server-info/ directory. These files are updated and read by the AI.
Files
services.md — Installed services and their status
packages.md — Installed critical packages
rules.md — Server constraints and rules
decisions.md — Decisions made and their rationale
architecture.md — Architecture notes and configuration details
changelog.log — Commands executed via command_execute_raw (auto-append)
Directories
knowledge/ — Knowledge files (.md) created and maintained by the AI
Each .md file represents a topic or knowledge domain
AI adds or updates files as it learns new server information
scripts/ — Reusable scripts for frequently performed operations
Store automation scripts here to speed up common tasks
AI creates and maintains scripts based on recurring operational patterns
Usage Rules
Read operations: Use
command_execute(protected by whitelist + write pattern detection)Permanent changes: Use
command_execute_raw(unfiltered + user approval required)Read-only commands are blocked in
command_execute_raw→ usecommand_executeinstead
Files are updated by AI when system changes occur
AI reads these files to get server information when needed
Security
Command Protection
Every command goes through a three-layer defense:
Whitelist — Unknown commands are blocked (e.g., python, node, perl, ruby, mount, screen, tmux, dd, zip, gzip)
Write Argument Detection — Even whitelisted commands are checked for write flags (e.g.,
tar cf,systemctl restart,docker run,git add)Redirection Detection — File write operators (
>,>>) are blocked
No bypass is possible. No permanent modifications can be made through command_execute.
Readonly Mode
When MCP_SSH_READONLY=true:
Registry write tools (
registry_add_server,registry_update_server,registry_delete_server) are disabledAll commands pass through whitelist + write pattern checks
No permanent changes can be made to any server
Credentials & Storage
Passwords are never stored in the registry
Use environment variables:
SSH_PASSWORD_<ALIAS>(uppercase alias)Key-based auth is recommended for production use
Registry directory:
~/.ssh-admin/with mode0700Registry file:
hosts.jsonwith mode0600Password memory is wiped immediately after credential verification
Configuration
Setting | Default | Description |
Connection timeout | 5000ms | SSH connection establishment timeout |
Command timeout | 60000ms | Command execution timeout |
Keepalive interval | max(10s, timeout/3) | SSH keepalive interval |
Keepalive count | 10 | Number of failed keepalives before disconnect |
Verification timeout | max(30s, timeout) | Connection verification timeout |
forceIPv4 | false | Force IPv4 connections (set per host in registry) |
Development
npm install # Install dependencies
npm run dev # Watch mode via tsx
npm test # Run tests (477 tests)
npm run build # TypeScript compile + bundleLicense
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
- AlicenseAqualityCmaintenanceA server that enables secure interaction with remote SSH hosts through standardized MCP interface, providing functions like listing hosts, executing commands, and transferring files using native SSH tools.741290MIT
- FlicenseAqualityFmaintenanceA server based on the MCP framework that provides remote server management capabilities through SSH, supporting features like connection pooling, file transfers, and remote command execution.7
- AlicenseAqualityBmaintenanceMCP server for managing remote servers via SSH, enabling command execution, file transfer, rsync, tunnels, health checks, backups, and database operations.175961MIT
- AlicenseBqualityAmaintenanceMCP server for managing SSH tunnels and remote hosts, offering tools for host inventory, file operations, security scanning, and SSH configuration.82MIT
Related MCP Connectors
An MCP server for deep research or task groups
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for managing Prisma Postgres.
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/AlperTk/ssh-admin'
If you have feedback or need assistance with the MCP directory API, please join our Discord server