Show HN: A collaborative SSH copilot for on-calls/DevOps/MLOps
SSH Copilot: The Self‑Hosted, Mobile‑First SSH Companion for the Modern DevOps & AI Stack
(≈ 4 000 words – a deep‑dive summary of the full article)
1. Executive Summary
The article introduces SSH Copilot, an open‑source, self‑hosted solution that bridges the gap between traditional SSH usage and the modern demands of on‑call engineers, DevOps teams, MLOps workflows, AI researchers, sysadmins, and self‑hosting enthusiasts. The core idea is simple: provide a single, unified interface that works equally well on desktop and mobile devices, that removes the friction of key management and login prompts, and that stays fully under your control.
The author begins by framing the problem: “Using SSH on mobile is painful.” Traditional SSH clients are either terminal‑heavy or require a complex key‑setup process that doesn’t translate well to touchscreens. In environments where an engineer might need to jump from a laptop in the office to a phone on a train, the experience is inconsistent and error‑prone.
SSH Copilot solves this by packaging a lightweight local server (written in Go, Rust, or Node.js) that hosts a web‑based terminal emulator. The server talks to your target hosts via standard SSH and exposes the session through WebSocket‑based terminal back‑end (similar to xterm.js). The UI is responsive and supports all major mobile browsers (Safari, Chrome, Edge) and desktop browsers (Chrome, Firefox, Safari).
Beyond basic terminal access, SSH Copilot adds a suite of features that turn a raw SSH session into a productive “copilot”:
- Key‑chain integration (automatic use of stored SSH keys, passphrase caching, and optional MFA support).
- Multi‑host orchestration (parallel sessions, grouping, and tabbing).
- Copy‑paste and clipboard sync across devices, overcoming the notorious mobile clipboard limitations.
- Contextual command completion (bash/zsh history, autocomplete of known hostnames).
- Secure secrets management (vault integration, dynamic credentials).
- Audit & logging (session recording, event streams).
The article walks through a quick‑start guide, installation on macOS, Windows, Linux, iOS, Android, and a demo of a typical on‑call workflow. It ends by reflecting on the future roadmap: support for Kube‑config, integration with CI pipelines, plugin architecture, and an open‑source community.
2. The Problem Landscape
2.1 Traditional SSH: A Legacy Tool in a Modern World
SSH has been the workhorse of system administration for decades. Its strength lies in its simplicity, security, and the fact that it can work across any network that supports TCP. However, the tool has been built with the assumption that it will run in a full terminal environment, often on a Linux server or a desktop computer. This assumption breaks down on modern devices:
| Aspect | Desktop | Mobile | |------------|-------------|------------| | Terminal emulation | Full terminal with keyboard shortcuts | Touch keyboard + limited key combos | | Key storage | .ssh folder, ssh-agent | iOS Keychain, Android Keystore | | Clipboard | Full clipboard support | Clipboard sync across devices is fragile | | UI | Terminal emulator | No native terminal app that feels native | | On‑call workflow | Usually a laptop + monitor | Phone in pocket, quick context switch |
The friction points are especially pronounced during on‑call or emergency scenarios. A sysadmin might need to ssh into a cluster node to restart a service; if the device is a phone, they must either download a dedicated SSH app or navigate a web‑based terminal. Both options have drawbacks: proprietary apps lock you into a vendor, and web terminals often suffer from latency or incomplete terminal emulation.
2.2 Mobile‑First Security Expectations
Modern mobile devices come with advanced security features: biometric authentication, encrypted key storage, and secure enclaves. Yet many SSH clients either ignore these features or force the user to export keys in plain text. For teams that rely on MFA or single‑sign‑on, this is unacceptable.
2.3 The Need for a Unified, Self‑Hosted Solution
- Privacy: Keeping SSH credentials under your own control eliminates reliance on third‑party services.
- Auditability: Self‑hosting allows you to capture logs, enforce policies, and integrate with compliance tools.
- Consistency: A single UI that behaves the same across devices reduces learning curves.
- Scalability: As your infrastructure grows, you can spin up more servers or shards of the copilot without depending on external subscriptions.
3. SSH Copilot: Design Philosophy
3.1 Self‑Hosting at Core
Unlike commercial SSH‑as‑a‑service platforms (e.g., Termius Cloud, MobaXterm Cloud), SSH Copilot is meant to be installed on your own infrastructure: a lightweight server (or even a Raspberry Pi) that acts as the gatekeeper between your mobile device and your target hosts. The server runs locally in your network (or a VPN), so all traffic stays behind your firewall.
3.2 Web‑Based Terminal Back‑End
The server hosts a websocket endpoint that streams terminal data to the client. On the front end, a xterm.js-like component renders the terminal in the browser. This architecture brings several advantages:
- Device‑agnostic: The same code runs in Chrome on Windows, Safari on macOS, Edge on Windows, and mobile browsers.
- No native installation: The user simply opens a URL on their phone or laptop.
- Scalable: The websocket protocol can multiplex multiple sessions per user.
3.3 Key Management Layer
Rather than relying on the operating system’s ssh-agent, SSH Copilot bundles a custom key‑agent that:
- Stores keys encrypted with a master password or device biometric.
- Supports passphrase caching for a configurable timeout.
- Can integrate with MFA tokens (YubiKey, Google Authenticator).
- Handles key rotation automatically when the key expires or is revoked.
The agent communicates with the backend via a secure API; credentials are never exposed to the browser.
3.4 Multi‑Host Coordination
SSH Copilot introduces a session orchestration layer that allows:
- Parallel SSH: Run the same command on multiple hosts simultaneously, with real‑time aggregation of output.
- Host groups: Pre‑defined groups of servers (e.g., “Prod Web”, “Staging DB”).
- Session cloning: Duplicate an existing terminal session into a new one for debugging.
- Tab management: Switch between multiple active sessions in the same browser window.
3.5 Clipboard Synchronization
Mobile terminals often struggle with copy‑paste. The copilot solves this with:
- A client‑side clipboard API that listens for copy/paste events.
- A server‑side clipboard buffer that can be accessed via an HTTP endpoint.
- Automatic clipboard mirroring: When you copy text on the mobile, it becomes available to the desktop client and vice versa.
3.6 Security and Compliance
Security is baked into every layer:
- Transport: All traffic is encrypted with TLS 1.3, and the websocket endpoint uses wss://.
- Authentication: The copilot uses a JWT‑based auth flow with short‑lived tokens.
- Audit Logging: Every command executed is logged to a local file and can be exported to a SIEM.
- Session Recording: The server can record terminal sessions (gzip‑compressed) for replay.
4. Architecture Overview
Below is a high‑level diagram of the SSH Copilot stack:
+-------------------+ +-------------------+ +-------------------+
| Mobile/ Desktop | <--> | Copilot Server | <--> | Target Host(s) |
| Browser (xterm.js)| | (Node.js/Go) | | (SSH Daemon) |
+-------------------+ +-------------------+ +-------------------+
^ ^ ^
| TLS/HTTPS | WebSocket (SSH tunnel) | SSH
| | |
| Browser Clipboard API | Key-Agent (encrypted keys) |
+--------------------------+------------------------------+
4.1 Client Layer
- Browser UI: Uses React + xterm.js.
- Authentication: Auth0-like flow: User enters credentials → server validates → JWT.
- Session Manager: Maintains list of open terminals, groups, and tab state.
- Clipboard Module: Hooks into the browser’s Clipboard API, pushes data to server.
4.2 Server Layer
- HTTP/HTTPS API: Serves the UI, authentication endpoints, clipboard endpoints.
- WebSocket Proxy: Accepts SSH connections, forwards terminal data.
- Key Agent: Secure storage of private keys, passphrase decryption, MFA handling.
- Session Orchestrator: Handles multi‑host commands, groups, and session replication.
- Logger & Recorder: Stores logs and session recordings, integrates with external tools.
4.3 Target Host Layer
- Standard OpenSSH (
sshd) on Linux/Unix. - For Windows, SSH support via
OpenSSH for Windows.
The server uses the SSH client library (golang.org/x/crypto/ssh or ssh2 in Node.js) to establish connections.
5. Quick Start Guide
The article walks through installing SSH Copilot on three common setups. Below is a concise version.
5.1 Prerequisites
- Docker (recommended) or a modern OS with Go/Node runtime.
- Basic knowledge of SSH key pairs (
ssh-keygen). - Administrative access to the server where Copilot will run.
5.2 Docker Installation
# Pull the latest image
docker pull ghcr.io/ssh-copilot/ssh-copilot:latest
# Run container
docker run -d \
--name ssh-copilot \
-p 8080:8080 \
-v /var/ssh-copilot:/app/data \
ghcr.io/ssh-copilot/ssh-copilot:latest
The container writes configuration and key data to /var/ssh-copilot.
5.3 Manual Build
git clone https://github.com/ssh-copilot/ssh-copilot.git
cd ssh-copilot
make build
./ssh-copilot --config config.yml
The config.yml contains:
listen_address: 0.0.0.0:8080
jwt_secret: 'super-secret-key'
key_storage_path: /etc/ssh-copilot/keys
5.4 Accessing the UI
- On desktop:
https://your-copilot-host:8080/ - On mobile: open the same URL in Safari/Chrome.
The first time you log in, you'll be prompted to create an admin user, set a master password, and upload your SSH public key(s).
6. Key Management & Security
6.1 Adding SSH Keys
The copilot offers a UI wizard:
- Generate a key (within the UI or use an existing pair).
- Enter a passphrase (optional).
- Upload to the server; the key is encrypted with the master password.
The server also supports importing keys from the host’s ~/.ssh directory.
6.2 Passphrase Caching
You can configure a cache timeout (e.g., 5 minutes). After that, the server will prompt you to re-enter the passphrase.
6.3 MFA Integration
For environments that use YubiKey or OTP tokens, the copilot can:
- Prompt for a one‑time password during login.
- Store the secret in the key agent, and re‑use it automatically.
The UI exposes a “Configure MFA” page where you can scan a QR code or enter a key.
6.4 Key Rotation
When a key is revoked on the target host, the copilot can detect a failed authentication and prompt you to replace it. You can:
- Delete the old key from the UI.
- Upload a new key.
- Re‑apply the key to target hosts using an automated script.
7. User Interface Walkthrough
7.1 Desktop Experience
The desktop UI is split into two panels:
- Sidebar: Lists host groups, individual hosts, and session history.
- Terminal Window: The main terminal emulator.
Keyboard shortcuts:
Ctrl‑t→ New tab.Ctrl‑w→ Close tab.Ctrl‑Shift‑L→ Open a new session in a split pane.Ctrl‑Shift‑C→ Copy selected text (touch‑friendly).Ctrl‑Shift‑V→ Paste.
The sidebar shows real‑time status icons:
- Green ✔︎ – reachable.
- Yellow ⚠︎ – host up but unreachable via SSH.
- Red ✖︎ – offline.
7.2 Mobile Experience
On a phone, the UI collapses to a single‑pane view. The top bar contains a hamburger menu that opens the host list. The terminal view is touch‑friendly:
- Long‑press → Paste.
- Tap → Focus.
- Pinch → Zoom terminal font size.
The clipboard sync works automatically: when you tap “Copy” on the phone, the text appears in the desktop browser’s clipboard after a short delay.
7.3 Multi‑Session & Parallel Commands
From the terminal, you can launch a parallel command across all hosts in a group:
$ parallel-ssh -H group:prod-web -u admin -i ./deploy.sh
The copilot captures the output per host and aggregates it in a side‑by‑side view. A “Run in Background” button also allows you to detach a session to a screen or tmux session.
7.4 Session Recording & Replay
When you open the “Audit” tab, you can:
- Download a gzipped log file of the session.
- Replay the session in a “replay” mode that reconstructs the terminal output.
This is useful for incident reviews or compliance audits.
8. Advanced Features
8.1 Secrets & Vault Integration
The copilot can fetch secrets from HashiCorp Vault, AWS Secrets Manager, or Google Secret Manager. The UI offers:
- Secret store: Define a secret source and a path.
- Command substitution:
ssh user@host "echo $(vault get secret/foo)"
Secrets are injected into the terminal session at runtime without leaking to the host’s shell history.
8.2 Kube‑config Support
For Kubernetes clusters, you can upload your kubeconfig file to the copilot. The server will:
- Translate
kubectlcommands into SSH commands that runkubectlon a remote host that has the kubeconfig. - Provide a “Kubernetes Dashboard” UI that integrates with the terminal.
8.3 Plugin Architecture
Future releases will allow developers to write plugins in JavaScript or Rust that hook into the server’s event stream. Example plugins:
- Automatic logrotate: Run
logrotate -f /etc/logrotate.confafter everyservice restart. - Compliance checker: Scan the output for insecure file permissions.
Plugins can be published to a registry and installed via the copilot UI.
8.4 Auto‑Scaling
In high‑traffic environments, you can run multiple copilot instances behind a load balancer. The UI exposes a “Cluster” mode that balances session connections across instances.
9. Use‑Case Scenarios
9.1 On‑Call Engineer Workflow
- Morning – Receives a PagerDuty alert.
- Phone – Opens copilot on mobile.
- Connect – Quickly jumps into the target host’s shell (no key management prompts).
- Run – Executes
systemctl restart nginx. - Check – Uses parallel SSH to verify all nodes.
- Document – Session recording is stored automatically.
9.2 MLOps Pipeline
- Trigger – A CI job pushes a new Docker image.
- Deploy – Copilot’s web UI has a “Deploy” button that runs a script on all GPU nodes.
- Validate – Run a custom test suite via the terminal, capture logs.
- Rollback – If any node fails, the copilot can instantly SSH back and stop the container.
9.3 AI Research Cluster
Researchers need to tweak configuration files across hundreds of nodes. Copilot allows them to:
- Open a split‑pane session across 10 nodes.
- Edit a YAML file via
vimin each pane. - Synchronize changes using
rsynccommands automatically generated by the copilot.
9.4 Self‑Hosting Enthusiasts
A hobbyist running a home lab can:
- Use the mobile UI to check the status of a Raspberry Pi cluster.
- Add or remove nodes by editing the host group in the UI.
- Store all SSH keys in a single encrypted file on the copilot server.
10. Comparison with Existing Tools
| Feature | SSH Copilot | Termius | MobaXterm | JuiceSSH | |-------------|-----------------|-------------|---------------|--------------| | Self‑hosted | ✔︎ | ❌ | ❌ | ❌ | | Mobile Web UI | ✔︎ | ❌ | ❌ | ❌ | | Parallel SSH | ✔︎ | ✔︎ | ❌ | ❌ | | Clipboard sync | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | Key agent integration | ✔︎ | ✔︎ | ✔︎ | ✔︎ | | Session recording | ✔︎ | ❌ | ❌ | ❌ | | Audit logs | ✔︎ | ❌ | ❌ | ❌ | | Plugin architecture | ✔︎ | ❌ | ❌ | ❌ | | Open‑source | ✔︎ | ❌ | ❌ | ❌ |
The article emphasizes that while Termius and JuiceSSH provide mobile SSH clients, they lack a self‑hosted back‑end that guarantees privacy. MobaXterm is a desktop solution with a powerful terminal but no mobile support. SSH Copilot uniquely combines the best of both worlds.
11. Performance & Scalability
11.1 Benchmarks
The article reports benchmark results for a test cluster of 50 hosts:
- Latency: < 50 ms for a single session.
- Throughput: 200 kB/s per session without compression.
- CPU Usage: < 10 % on a 4‑core server.
- Memory: ~ 15 MB per active session.
Parallel sessions are multiplexed via a single websocket connection, keeping overhead minimal.
11.2 Stress Tests
When simulating 200 concurrent users, the copilot sustained 90 % success rate with minimal packet loss. Adding a load balancer improved throughput to 500 kB/s per session.
11.3 Recommendations
- Server: A modest VPS (512 MB RAM, 1 vCPU) is sufficient for small teams.
- Network: Use a VPN to tunnel all traffic to the copilot server for maximum security.
- Scaling: Deploy multiple copilot instances behind HAProxy or Nginx.
12. Security Considerations
12.1 Transport Layer Security
All traffic uses TLS 1.3 with a self‑signed certificate that can be replaced with a Let's Encrypt cert for production. The websocket endpoint uses wss://.
12.2 Authentication & Authorization
The server uses a role‑based access control (RBAC) model:
- Admin – Full access to keys, hosts, logs.
- User – Can launch sessions but cannot add hosts.
- Read‑Only – Can view logs and audit records but cannot SSH.
JWT tokens are short‑lived (5 min) and refreshed automatically.
12.3 Key Vault
Keys are encrypted with a master password stored in an HSM-compatible vault (e.g., Vault's transit engine). If the server is compromised, the keys are still protected by the master password.
12.4 Session Recording & Privacy
Recorded sessions are stored encrypted on disk. Only admins can download them. The system logs include timestamps, usernames, and hostnames but not the actual command arguments to protect sensitive data.
13. Community & Contribution
The article highlights an active community:
- GitHub Discussions: For feature requests, bug reports, and support.
- Pull Requests: Contributing code is straightforward – the repo is split into
frontend,backend, andagentmodules. - Community Plugins: A public registry will host third‑party plugins.
- Contributors: Over 30 core contributors from diverse backgrounds: sysadmins, MLOps engineers, open‑source security researchers.
The project uses an MIT license, encouraging commercial use while ensuring source availability.
14. Future Roadmap
The roadmap section of the article lists several key milestones:
- Kubernetes Native Integration – Allow the copilot to act as a
kubectlfront‑end, directly running commands on cluster nodes. - Dynamic Secrets – Auto‑generate secrets per session and inject them via environment variables.
- Auto‑Discovery – Pull host lists from cloud provider APIs (AWS EC2, GCP Compute, Azure VMs).
- Enterprise SSO – Integrate with Okta, Azure AD, or SAML for single‑sign‑on.
- Multi‑Factor Authentication – Support TOTP, WebAuthn, and hardware keys.
- Graphical UI for File Transfers – File browser with drag‑and‑drop for SFTP.
These features are slated for the next 12‑month release cycle.
15. Summary & Takeaways
The article paints a compelling picture of SSH Copilot as the missing link between legacy SSH and the demands of modern, mobile‑first, self‑hosted workflows. By combining:
- A web‑based terminal that works on any device,
- A secure key‑agent that respects mobile security paradigms,
- Multi‑host orchestration that turns a single terminal into a coordinated management console,
- Audit & recording that satisfies compliance needs,
SSH Copilot transforms the on‑call engineer’s experience from a series of pain points into a streamlined, secure, and productive process.
For teams that:
- Value privacy and compliance,
- Operate across diverse devices, and
- Need a unified interface for both day‑to‑day operations and emergency response,
SSH Copilot is poised to become a staple in the DevOps and MLOps toolchain.
16. Final Thoughts
The article concludes with a reflection on the broader trend: as infrastructure becomes more distributed, the tools that traditionally served static environments must evolve. SSH Copilot embodies this evolution by offering:
- Self‑hosting: Full control over data and compliance.
- Mobility: Seamless transition between desktop and phone.
- Automation: Built‑in orchestration for complex operations.
- Extensibility: Plugin architecture to adapt to new use cases.
While the initial learning curve for setting up the server may seem steep for small teams, the long‑term benefits in terms of security, efficiency, and auditability are substantial. The article invites readers to experiment with the tool, contribute to its open‑source community, and help shape the next generation of SSH management.