mcp-ssh
This server provides SSH remote management tools for Windows, Linux, and macOS targets.
Test SSH connections: probe connectivity, detect OS, and output RDP bootstrap info if unreachable.
Execute remote commands: run commands/scripts with automatic Base64 encoding for PowerShell, long-command fallback via SFTP, and Windows Session 0 bypass (
desktop: true) to launch GUI apps on the interactive desktop.Transfer files: upload and download files securely via SFTP.
Set up passwordless SSH: deploy
ed25519public keys to Linux or Windows hosts and verify key-based login.Revoke passwordless access: remove a specific public key or clear all authorized keys.
Manage known hosts: clear stale or changed host entries from
~/.ssh/known_hosts.Generate Windows OpenSSH bootstrap: create a one-liner PowerShell script to install OpenSSH server via RDP.
List SSH profiles: read stored profiles from
~/.sshctl/profiles.json.Authentication and performance: support password/private key auth with environment variable resolution, and connection reuse with idle timeouts.
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., "@mcp-sshSSH into 192.168.1.50 and rundf -h"
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.
sshctl
A unified CLI and Model Context Protocol (MCP) server for cross-platform SSH remote execution, passwordless key management, Windows Session 0 interactive desktop process launching, and SFTP file transfers.
Architecture
Terminal / Human (CLI) AI Agent (Claude / Antigravity)
│ │
▼ ▼
sshctl (bin/sshctl.js) MCP Protocol (stdio JSON-RPC)
│ │
└──────────────────┬──────────────────────┘
▼
Core SSH Engine
│
┌───────────────┼───────────────┐
▼ ▼ ▼
Connection Pool PowerShell/UTF-16LE SFTP Channel
(60s idle reuse) (Session 0 / 8K limit) (FastPut / FastGet)
│ │ │
└───────────────┼───────────────┘
▼
Remote Target Host
(Windows / Linux / macOS)Related MCP server: SSH MCP Server
Features
Dual-Mode: Run interactively via CLI (
sshctl) or as an automated MCP server (sshctl mcp).Zero Local Client Shell Dependencies: Pure TypeScript with
ssh2. Does not require WSL, Git Bash,sshpass,iconv, or localsshbinaries.Automated PowerShell Command Encoding: Converts Windows command bodies to Base64 UTF-16LE strings (
powershell.exe -EncodedCommand), removing quote escaping errors.Session 0 Desktop Handoff (
--desktop): Launches Windows GUI applications directly onto the logged-in user's interactive desktop (Session 1) via Task Scheduler.8,191-Character Auto-Fallback: Automatically detects when PowerShell payloads exceed the
cmd.execommand length limit, uploading a temporary script via SFTP with execution and cleanup.Connection Pooling: Reuses SSH2 connections per
user@host:portwith 60-second idle timeouts.Profiles & Secret Resolution: Store targets in
~/.sshctl/profiles.json, resolving environment variables (env:VAR_NAME) without storing plain text passwords in chat logs.
Quick Start
1. Build
cd claude/sshctl
npm install
npm run build
npm test # 43 unit and integration tests2. CLI Usage
# List profiles
sshctl profiles
# Test connectivity and probe remote OS
sshctl test my-profile
# Run remote command
sshctl exec my-profile "hostname && dir"
# Launch GUI app on Windows active desktop
sshctl exec my-profile "calc.exe" --desktop
# Upload/Download files via SFTP
sshctl push my-profile local.txt /remote/path/file.txt
sshctl pull my-profile /remote/path/file.txt local.txt
# Generate Windows OpenSSH installer 1-liner
sshctl bootstrap-rdp --admin3. Register as MCP Server
sshctl implements the standard Model Context Protocol (MCP). Any MCP client automatically discovers all tools, arguments, and prompts over stdio JSON-RPC without needing external configuration files.
Claude Code CLI
claude mcp add sshctl -- node "/path/to/sshctl/dist/index.js"Claude Desktop (claude_desktop_config.json) / Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"sshctl": {
"command": "node",
"args": ["/path/to/sshctl/dist/index.js"]
}
}
}Google Antigravity
To enable Antigravity's lazy-loading schema discovery:
npm run export:schemasThis automatically writes tool definition JSONs and instructions.md to ~/.gemini/antigravity/mcp/sshctl/.
MCP Tools Reference
ssh_list_profiles: List profiles from~/.sshctl/profiles.json.ssh_test_connection: Probe SSH connectivity & detect target OS.ssh_clear_known_hosts: Clear stale entries from~/.ssh/known_hosts.ssh_exec: Execute remote commands with Base64 UTF-16LE, Session 0 bypass (desktop: true), and output capping.ssh_setup_passwordless: Deployed25519key to Linux (~/.ssh/authorized_keys) or Windows (administrators_authorized_keyswith strict ACLs).ssh_remove_passwordless: Revoke public key or clear all keys.ssh_upload_file: Upload file via SFTP.ssh_download_file: Download file via SFTP.ssh_generate_rdp_bootstrap: Generate OpenSSH installation 1-liner.
Technical Documentation
For details on PowerShell Base64 encoding, the 8,191-character boundary fallback, Session 0 bypass mechanism, and error code tables, see docs/REFERENCE.md.
License
MIT
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
- AlicenseAquality-maintenanceEnables 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
- AlicenseBqualityDmaintenanceEnables secure SSH connections to remote servers for executing shell commands and managing active sessions. It supports authentication via passwords or private keys and provides optional host-based access control.4210MIT
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Eyes and hands on real Windows PCs — observe, click, type via Glasswarp API.
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/nguyenvanhuy0612/sshctl'
If you have feedback or need assistance with the MCP directory API, please join our Discord server