OctSSH
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., "@OctSSHrun 'df -h' on web-server"
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.
OctSSH
I was just VibeCoding and suddenly thought: Why can't I just let my agent deploy code to the server for me?
So, I built OctSSH.
OctSSH is an MCP server that gives LLMs safe, controllable, and stateful access to shell environments.
Note
By default (stdio mode), OctSSH only connects to machines already configured in your local ssh_config for passwordless login.
So... what makes OctSSH special?
Async Support
OctSSH provides a complete set of async tools to prevent LLMs from timing out on long-running tasks:
Tool | Description |
| Run short commands synchronously |
| Run synchronously as root ( |
| Run long tasks in background (screen) |
| Run background tasks as root |
| Write to stdin of a running async task |
| Inspect async task output |
| Search task logs |
| Terminate a task |
| Pause (useful for polling) |
Note: In HTTP Serve mode, these tools operate directly on the local machine, and the
machineparameter is omitted.
Related MCP server: MCP SSH Server
Security Design
OctSSH features a Virtual Mode and Confirm Code verification flow:
π Safety Mechanism: Virtual Mode
We don't want AI to become a world-ending terminator, so we designed Virtual Mode.
When the AI attempts the following, OctSSH will not execute immediately, but instead returns a confirm_code:
π File Overwrite: Uploading to a path that already exists.
π High-Risk Commands:
rm -rfand similar "delete everything" commands.π Regex Blocklist: Custom sensitive patterns defined in config.
Execution Flow Example:
AI calls
exec("web", "rm -rf /var/www/html")π OctSSH intercepts: Recursive delete detected -> Returns
confirm_code: a1b2c3+ file impact preview.π€ User reviews and tells AI: "Confirm execution".
β AI calls
exec("web", "rm -rf /var/www/html", "a1b2c3")-> Actually executes.
Quick Start
Installation
npm install -g @aliyahzombie/octssh
octssh initUsage Modes
1. Default Client Mode (stdio)
Runs locally and controls remote machines via SSH (reads ~/.ssh/config):
octssh2. Streamable HTTP Server Mode (Local Control)
Install this on the target server. It exposes the server to LLMs via a secure HTTP interface. In this mode, OctSSH controls the local machine directly (no outbound SSH).
octssh serveDefault Listen:
127.0.0.1:8787(Override viaOCTSSH_SERVE_HOST/OCTSSH_SERVE_PORT)Auth: Prints a random key on startup. Clients must send header
X-OctSSH-Key: <key>.Set fixed key:
export OCTSSH_SERVE_KEY="my-secret"
Tool Changes: Tools run on this machine.
machineparameter is omitted. SSH transfer tools (upload/download) are disabled.
Windows notes (serve mode)
On Windows, OctSSH serve will auto-select a local shell in this order:
sh(if available, e.g. Git-Bash/MSYS)pwshpowershellcmd
Override with:
set OCTSSH_SHELL=powershellTool Prefix (optional)
To avoid tool name collisions when you run multiple OctSSH instances, you can prefix all exposed tools:
export OCTSSH_TOOL_PREFIX="us1_"Example: list becomes us1_list.
write-stdin (async interactive input)
write-stdin lets you send input to a running exec-async session.
Typical flow:
Start a long-running command that reads stdin (via
exec-async)Send data with
write-stdin(session_id, data)Poll output with
get-result(session_id)
Notes:
Default
append_newlineistrue.Max payload is 64KiB per call.
This is a streaming stdin: EOF is not sent. If the program exits on EOF, cancel the session instead.
If you set
OCTSSH_TOOL_PREFIX, tool names are prefixed too (e.g.us1_write-stdin).
MCP Client Configuration
General (stdio)
Add to your MCP client config:
{
"mcpServers": {
"octssh": {
"command": "octssh",
"args": []
}
}
}Claude Code CLI
claude mcp add octssh -- octsshOpenCode CLI
{
"mcp": {
"octssh": {
"type": "local",
"command": "octssh",
"args": [],
"enabled": true
}
}
}Or:
opencode mcp add octssh --command octsshThis project connects to real servers (or executes on the local machine). Please carefully review LLM operations. Using this project means you agree that the developer is not responsible for any accidental damage.
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.
Latest Blog Posts
- 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/AliyahZombie/OctSSH'
If you have feedback or need assistance with the MCP directory API, please join our Discord server