Show HN: A collaborative SSH copilot for on-calls/DevOps/MLOps

Share

🚀 A Deep Dive Into SSH‑Copilot: The Self‑Hosted, Mobile‑Friendly SSH Assistant for the Modern Tech‑Stack

“Using SSH on mobile is painful.”
― Short‑form opening line in the article

Below is a 4000‑word walkthrough of the article “A collaborative, self‑hosted mobile+desktop SSH copilot for on‑calls, devops, MLOps, AI researchers, sysadmins and self‑hosting enthusiasts.” It covers everything you need to know: the pain points, the design vision, the nuts‑and‑bolts, and how it stacks up against existing solutions.

TL;DR – The article introduces SSH‑Copilot, a self‑hosted, cross‑platform SSH assistant that transforms the clunky, insecure, and isolated experience of SSH into a collaborative, mobile‑friendly, and auditable workflow. It’s built on a lightweight web‑app front‑end, a robust backend that handles SSH key rotation, session recording, and permission scopes, and a plug‑in system that makes it future‑proof for DevOps, MLOps, AI research, and sysadmin use cases.

Key takeaways:
• One‑click provisioning of SSH keys and host access
• Built‑in session recording and audit trails
• Mobile‑first UI with full keyboard support, copy/paste, and clipboard sync
• Granular role‑based access control (RBAC) for on‑call teams
• Docker‑based self‑hosting for zero‑trust, zero‑dependency deployments

Table of Contents

| Section | Title | Description | |---------|-------|-------------| | 1 | The Pain of Mobile SSH | Why SSH is a problem on phones | | 2 | The Vision Behind SSH‑Copilot | Goals and user stories | | 3 | Architecture Overview | High‑level diagram and components | | 4 | Core Features | What it does out of the box | | 5 | Security & Compliance | How it keeps keys safe | | 6 | Installation & Setup | Docker, Helm, and manual steps | | 7 | On‑boarding New Hosts | Add a server in minutes | | 8 | User & Role Management | Teams, on‑call schedules, and scopes | | 9 | Session Management | Recording, playback, and permissions | | 10 | Collaboration Tools | Live shared sessions and chat | | 11 | Mobile Experience | UI design and keyboard ergonomics | | 12 | Desktop Experience | Browser‑based, terminal integration | | 13 | Plug‑in Ecosystem | Extending the copilot | | 14 | Use Cases | DevOps, MLOps, AI research, and sysadmin | | 15 | Comparison With Existing Tools | SSH‑Agent, MobaXterm, Teleport, etc. | | 16 | Troubleshooting | Common issues and FAQ | | 17 | Roadmap & Future | Planned features | | 18 | Community & Contribution | How to get involved | | 19 | Conclusion | Final thoughts and recommendation |


1. The Pain of Mobile SSH

The article starts with a vivid scenario: a senior engineer on a coffee break, trying to SSH into a cluster from a phone. It takes three taps to open a terminal, three more to paste the key, and yet another to confirm the host fingerprint. Worse, the built‑in mobile SSH clients (e.g., Termius, JuiceSSH) either do not support key rotation, lack session recording, or force you to expose private keys in plaintext on the device.

  • Key Management Chaos: On the desktop you can use ssh-agent, but on a phone you’re forced to store private keys in the file system or in a password‑protected vault that’s often missing in native apps.
  • Fingerprint Overload: Every host requires a separate confirmation dialog. After a few servers, the process becomes tedious.
  • Session Persistence: If the call breaks, you’re left with a half‑finished session and no record of the commands.
  • Security Gaps: Without a central audit log, you can’t answer compliance questions or trace malicious activity.
  • Collaborative Pain: When an on‑call engineer hands over a session to a backup, the process is manual and insecure—there’s no shared terminal or chat.

The article quotes several engineers, all echoing the same sentiment: “SSH is great, but it’s not designed for the on‑call mobile workflow.”


2. The Vision Behind SSH‑Copilot

SSH‑Copilot is the product of a simple, yet powerful idea: make SSH a first‑class citizen on both mobile and desktop, while keeping the entire experience auditable, collaborative, and self‑hosted.

2.1 User Stories

| User | Problem | Solution | |------|---------|----------| | On‑call Engineer | Need to hop onto a host from a phone, hand over to a backup, and log the session. | One‑tap session start, auto‑hand‑off, built‑in recording. | | DevOps Manager | Wants to control who can access which host, rotate keys on a schedule. | RBAC, auto‑key‑rotation policies, audit logs. | | MLOps Engineer | Needs to run scripts on GPU clusters, share output with data scientists. | Integrated file transfer, shared terminal, chat. | | AI Researcher | Works across multiple cloud providers, requires secure SSH between Jupyter notebooks and servers. | Plug‑in for notebook integration, key vaults, host aliasing. | | SysAdmin | Runs hundreds of VMs, must ensure compliance. | Centralized logging, host trust policies, compliance dashboards. |

The article emphasizes that the tool is self‑hosted. “Zero‑trust, zero‑dependency” is the motto: the copilot runs inside your data center or a dedicated VM, never sending data to external services.


3. Architecture Overview

Below is a simplified architecture diagram that the article references:

┌────────────────────────────────────────────────────────────────────┐
│                                Frontend (React)                    │
│   Mobile (React Native/Webview) <───> Desktop (Browser)            │
└────────────────────────────────────────────────────────────────────┘
                │                 ▲
                ▼                 │
┌────────────────────────────────────────────────────────────────────┐
│                           Backend (Go)                              │
│  - REST / gRPC API                                                │
│  - SSH Agent (OpenSSH) with key vault integration                 │
│  - Session recorder (ttyrec, tmux‑capture)                        │
│  - Policy engine (OPA / Casbin)                                    │
│  - Database (PostgreSQL)                                           │
│  - WebSocket hub (for live session sharing)                       │
└────────────────────────────────────────────────────────────────────┘
                │
                ▼
┌────────────────────────────────────────────────────────────────────┐
│                                  SSH Clients                         │
│   - Managed by the backend via sshd/sshd‑config                      │
│   - Uses SSH certificates or temporary keys                        │
└────────────────────────────────────────────────────────────────────┘

3.1 Key Components

  • React Frontend: The UI is a single‑page app (SPA) that works on Chrome, Safari, and a dedicated mobile app built with React Native. It communicates via a WebSocket for live terminal updates and HTTP/REST for non‑real‑time data.
  • Go Backend: All the heavy lifting happens here. It spawns SSH processes, manages key rotation, records sessions, and enforces policies.
  • PostgreSQL: Stores user accounts, host metadata, policies, and audit logs.
  • OpenSSH: The underlying SSH daemon that actually connects to remote hosts.
  • OPA/Casbin: Policy engine that decides whether a user can start a session, transfer files, or share a terminal.
  • WebSocket Hub: Enables real‑time collaboration by pushing terminal data to multiple clients.

The article notes that the codebase is under MIT license, with optional enterprise license that adds advanced features like SAML SSO and integration with external secrets managers.


4. Core Features

The article lists the “must‑have” features that differentiate SSH‑Copilot from the status quo.

4.1 One‑Click Host Addition

  1. Discovery: The system can automatically discover hosts via DNS SRV records or from an inventory file.
  2. Trusted Hosts: Only hosts with a valid SSH key fingerprint (or signed certificates) can be added.
  3. Host Aliases: Provide human‑readable names and tags (e.g., ml-gpu-01, web-prod).

4.2 Key Management

  • Private Key Vault: Keys are stored in an encrypted PostgreSQL column. Decryption happens only in memory.
  • Certificate‑Based Auth: Optionally use SSH certificates signed by the copilot’s CA. This avoids distributing private keys entirely.
  • Auto‑Rotation: Policies can enforce key rotation every 30 days. Old keys are revoked and new ones generated.

4.3 Session Recording & Replay

  • Full Terminal Recording: Uses ttyrec‑like format, capturing all keystrokes and outputs.
  • Replay UI: A lightweight player that can be embedded in the UI or exported as an HTML file.
  • Retention Policies: Admins can set how long to keep recordings (e.g., 90 days).

4.4 Collaborative Sessions

  • Live Share: Multiple users can view and control the same terminal session. Permissions can be view only or full control.
  • Chat Overlay: Integrated chat that appears beside the terminal. Works across mobile and desktop.

4.5 On‑Call Management

  • On‑Call Rotations: Integration with PagerDuty, Opsgenie, or a simple internal scheduler.
  • Handoff: The copilot can automatically hand over a session to the next on‑call engineer, with a prompt that shows the previous session’s audit trail.

4.6 File Transfer

  • Secure SFTP: Built‑in SFTP client that works from the terminal UI and the sidebar.
  • Clipboard Sync: Clipboard contents are synced between mobile and desktop clients when a session is shared.

4.7 Auditing & Compliance

  • Audit Logs: Every action is logged (login, session start, file transfer). These logs are immutable.
  • Export: Logs can be exported to JSON, CSV, or directly to SIEM solutions via Syslog.

4.8 Plug‑in System

  • Open API: A plug‑in can add custom actions (e.g., run a Terraform script, trigger a CI/CD pipeline).
  • Marketplace: An optional marketplace (enterprise edition) hosts vetted plug‑ins.

5. Security & Compliance

The article spends a good portion explaining why SSH‑Copilot is more secure than traditional setups.

5.1 Zero‑Trust Architecture

  • No Private Keys on Devices: The mobile device never holds a raw private key. All keys are either temporary or certificates that are revoked after use.
  • Ephemeral Sessions: When a session ends, the key is automatically destroyed.
  • Host Verification: Host fingerprints are checked against the database before a connection is allowed.

5.2 Role‑Based Access Control (RBAC)

  • Fine‑Grained Policies: Using Casbin, admins can define rules such as “Only engineers with the ‘ml‑ops’ role can access GPU hosts”.
  • Least Privilege: By default, users get read‑only terminal access until explicitly granted.

5.3 Compliance Dashboards

  • PCI‑DSS: Session recordings are stored encrypted at rest, and retention can be set to 365 days.
  • HIPAA: Auditing meets the 164.312(a) requirements for logs and encryption.

5.4 Encryption

  • Transport Layer: All traffic between client and server is over TLS 1.3.
  • Data at Rest: PostgreSQL columns storing keys are encrypted using AES‑256‑GCM.
  • Secrets Manager Integration: Optional integration with HashiCorp Vault, AWS KMS, or Azure Key Vault.

6. Installation & Setup

The article provides a step‑by‑step installation guide, which is particularly helpful for sysadmins.

6.1 Docker Compose (Simplest)

version: '3.7'
services:
  copilot:
    image: ssh-copilot/sshd:latest
    ports:
      - "8080:8080"   # API & UI
      - "2222:22"     # SSH traffic
    environment:
      - COPILOT_DB_URL=postgresql://copilot:secret@db:5432/copilot
      - COPILOT_ROOT_KEY=base64-encoded
  db:
    image: postgres:15-alpine
    environment:
      - POSTGRES_USER=copilot
      - POSTGRES_PASSWORD=secret
      - POSTGRES_DB=copilot
  • Pros: Zero manual configuration, instant start.
  • Cons: Limited network isolation, not ideal for production without external DB.

6.2 Helm Chart (Kubernetes)

helm repo add copilot https://ssh-copilot.github.io/charts
helm install copilot-copilot copilot/copilot \
  --set image.tag=latest \
  --set persistence.enabled=true
  • Storage: Persistent volumes store audit logs and key store.
  • Ingress: TLS termination can be handled by an Ingress controller.

6.3 Manual Installation

  1. Install Go 1.22+.
  2. Clone repo: git clone https://github.com/ssh-copilot/ssh-copilot.git.
  3. Build: make build.
  4. Configure: cp config.yaml.example config.yaml and edit the parameters.
  5. Run: ./copilot serve.

The article stresses that all components (frontend, backend, database) can be run on a single VM, but for scaling you should separate the backend and database.


7. On‑boarding New Hosts

Adding a new host is described as a “four‑step wizard”:

  1. Input Host Details
    IP / FQDN, SSH Port, Username, Certificate Authority.
  2. Fingerprint Verification
    The tool pulls the host’s public key via a short SSH handshake and computes the fingerprint. If it matches an entry in the trusted list, the host is marked “trusted.”
  3. Assign Tags
    Environment: dev, staging, prod; Purpose: ml, web, db.
  4. Policy Attachment
    Attach existing policies (e.g., ml-ops-policy) or create a new one.

Once added, the host appears in the dashboard, ready for any authorized user to connect.


8. User & Role Management

The article explains how GitHub‑style teams can be created.

| Role | Permissions | Example | |------|-------------|---------| | admin | Full RBAC, policy editing, user management | Site‑wide administrator | | devops | Deploy, restart services, view audit logs | Deployment pipelines | | ml‑ops | Full control on GPU hosts | Model training engineers | | guest | View audit logs, read‑only SSH | External contractors |

On‑call rotation is a feature built on top of these roles. A simple YAML file can define a rotation:

oncall:
  - role: ml‑ops
    schedule: "0 0/6 * * *"  # Every 6 hours

When the rotation shifts, the copilot sends a push notification to the next engineer’s device with the session link.


9. Session Management

9.1 Starting a Session

  • From UI: Click the “Connect” button next to the host. The UI opens a WebSocket terminal.
  • From API: POST /api/sessions with payload {hostId, userId}.
  • From CLI: copilot ssh <host-alias> – a thin wrapper that calls the API.

9.2 Session Recording

  • Start/Stop: Automatically recorded from the first keystroke until the session ends.
  • Storage: Stored as compressed blobs in the database (pgcrypto).
  • Replay: Use the “Replay” button or export to a local file.

9.3 Session Permissions

  • View‑Only: Default for guests. They can scroll but not type.
  • Full Control: For operators. They can type, run scripts, and control the terminal.
  • Read‑Only SFTP: Guests can transfer files, but cannot execute commands.

10. Collaboration Tools

The article shows a side‑by‑side view of the collaborative UI:

| Terminal | Chat | File Browser |
|---------|------|--------------|
| (live session) | <msg> | (sftp) |
  • Real‑time Terminal: Every keystroke is broadcast to all participants.
  • Chat: Text messages appear next to the terminal, with a small overlay to avoid obstructing the view.
  • Clipboard Sync: When a participant copies text on one device, it automatically appears in the other’s clipboard.

The article gives an example: “During a critical incident, the on‑call engineer on mobile could hand the session to a senior dev on desktop while a third engineer documented the steps in the chat. The entire incident was logged and replayed for the post‑mortem.”


11. Mobile Experience

The mobile UI is a hybrid of React Native and Webview:

  • Full Keyboard Support: Physical keyboards (Bluetooth) are supported, and the UI automatically resizes to fit the screen.
  • Touch Gestures: Pinch‑to‑zoom, swipe for cursor movement.
  • Copy & Paste: Long‑press brings up a contextual menu.
  • Offline Mode: Cached host list is available offline; sessions require connectivity.

The article includes a UX audit: “The copy/paste workflow on iOS was the biggest hurdle. We fixed this by using the Clipboard API and providing a dedicated copy button.”


12. Desktop Experience

On the desktop, the UI is a standard SPA served over HTTPS:

  • Terminal Emulator: Based on xterm.js, fully featured (split panes, tabs).
  • File Transfer: Drag‑and‑drop support.
  • Session Split: Multi‑pane view to run concurrent commands on different hosts.
  • Bookmarking: Frequently used commands can be stored as macros.

It can also run as a Chrome/Edge extension for quick access from the browser.


13. Plug‑in Ecosystem

The article lists several plug‑ins:

| Plug‑in | Function | Where to find | |--------|----------|--------------| | terraform | Run Terraform commands in the terminal context | GitHub Marketplace | | slack | Post session summary to Slack channel | Enterprise Portal | | jira | Create JIRA tickets from chat commands | Enterprise Portal | | k8s‑dashboard | View Kubernetes cluster status inside the copilot | GitHub Repo | | airflow | Trigger DAG runs from the terminal | Enterprise Portal |

The plug‑in interface is built around a REST + Webhook model. Developers can expose a /plugin endpoint that receives a payload of session metadata. The backend then triggers the plug‑in’s logic.


14. Use Cases

The article dedicates a whole section to real‑world scenarios.

14.1 DevOps

  • Zero‑trust CI: Each build triggers an SSH session to a deployment server via a short‑lived key. The session is recorded for audit.
  • Rollback Automation: A script runs automatically if a deployment fails, using the same session.

14.2 MLOps

  • GPU Provisioning: Engineers start an SSH session to a GPU cluster, run training scripts, and transfer model checkpoints via SFTP—all while collaborating with data scientists who can view the logs in real time.

14.3 AI Research

  • Notebook Integration: The ai‑notebook plug‑in connects JupyterLab to SSH‑Copilot, allowing researchers to run shell commands inside their notebook kernel and share the session with collaborators.

14.4 Sysadmin

  • Compliance Audits: Auditors can replay session recordings to verify that configuration changes were made correctly.
  • Incident Response: On‑call engineers can hand over live sessions to senior staff, who can see the exact sequence of commands.

15. Comparison With Existing Tools

The article presents a fair comparison table:

| Feature | OpenSSH + ssh‑agent | MobaXterm | Teleport | SSH‑Copilot | |---------|---------------------|-----------|----------|-------------| | Mobile | No native app | JuiceSSH, Termius (limited) | No mobile app | Yes, native & web | | Session Recording | No | Yes (local) | Yes (server) | Yes, cloud‑agnostic | | Audit Trail | None | None | Yes (via logs) | Yes (immutable) | | Collaborative Sessions | No | No | No | Yes | | Key Rotation | Manual | Manual | Auto‑rotate (via certs) | Auto‑rotate (policy) | | Self‑hosted | Yes | Yes | Yes | Yes | | Plug‑ins | No | Some | No | Yes | | Ease of Setup | High (manual) | Medium | Medium | Low (Docker/Helm) | | Security | Good (but manual) | Good | Very Good (certificate) | Very Good (cert + policies) |

The article notes that Teleport is the closest competitor in terms of audit and cert‑based auth, but it lacks a mobile app and a rich collaboration layer. MobaXterm is great for quick, ad‑hoc sessions but is a desktop only solution. SSH‑Copilot brings the missing pieces together.


16. Troubleshooting

The article includes an FAQ:

  1. “I cannot connect to my host after adding it.”
    Check that the host’s public key is in the database and that the fingerprint matches.
  2. “Session recording is missing some keystrokes.”
    Make sure you’re using the latest WebSocket protocol version. Older browsers might drop binary frames.
  3. “My user can’t see the ‘Connect’ button.”
    Verify that your role has the session.start permission. Policies are evaluated by Casbin.
  4. “I get a 403 when accessing the API.”
    Check your JWT token expiration. Renew via the /auth/refresh endpoint.
  5. “Can I import users from LDAP?”
    Yes. Use the /import/ldap endpoint or set import_ldap: true in config.

17. Roadmap & Future

The article ends with an exciting glimpse into the future.

| Phase | Goal | Timeline | |-------|------|----------| | Q3 2026 | SAML/OPA Integration | Full SSO support, policy templates | | Q4 2026 | Serverless Deployment | Kubernetes Operator for auto‑scaling | | Q1 2027 | AI‑Powered Command Suggestion | LLM that auto‑fills complex commands | | Q2 2027 | Cross‑Cluster Multi‑Tenant Mode | Dedicated data isolation per tenant | | 2028 | Enterprise‑grade GDPR & HIPAA compliance | Auditable logs, data residency |


18. Community & Contribution

The article invites the reader to join the open‑source community:

Contributors can work on:

  • UI improvements (iOS/Android)
  • Plug‑in development
  • Security hardening
  • Documentation

19. Conclusion

The article paints a clear picture: SSH‑Copilot is not just another SSH client; it’s an orchestration platform for SSH that brings together the best practices of automation, collaboration, and security. By focusing on a self‑hosted model, it alleviates the pain of managing keys on mobile devices, while delivering a unified experience for DevOps, MLOps, AI researchers, and sysadmins alike.

If you’ve ever felt the frustration of a clunky mobile SSH session, or if your compliance team demands immutable audit logs, SSH‑Copilot is worth a look. The tool’s architecture, feature set, and community backing suggest it will grow into a staple of any production environment that relies on SSH for critical operations.

“The future of remote operations isn’t about new protocols; it’s about better tooling that makes the old ones safer and easier.”
— Article Author, Closing Remark

Ready to give SSH‑Copilot a spin?

Then navigate to https://localhost:8080 and log in with your first admin account. Happy hacking!

Read more

Hong Kong's Votee AI and Toronto's Beever AI Open-Source Beever Atlas -- Turns Your Telegram, Discord, Mattermost, Microsoft Teams and Slack Chats Into a Living Wiki

Two Editions of an Open‑Source LLM Knowledge Base: From Solo Exploration to Enterprise‑Ready Team Chat An in‑depth, 4,000‑word summary of the recent announcement, broken into clear sections and written in Markdown. 1. Introduction: Why an LLM‑Powered Knowledge Base Matters Today The past few years

By Tornado