ssh <handle>@ssh.nibling.dev lists the account's open sandboxes, ssh -t <handle>@ssh.nibling.dev <slug> opens a shell in one, and ssh <handle>@ssh.nibling.dev <slug> -- npm test runs one command and returns its exit code. This records D25 on main and ships everything it needs.
What lands #
packages/ssh-gateway: a self-hostable Node service on ssh2 and ws. SSH keys come from the account'sorg.tangled.key.sshKeyrecords (legacysh.tangled.publicKeyas a fallback), cached an hour. A tab attaches over a WebSocket at/xrpc/dev.nibling.ssh.attachwith a 60-second service-auth token whose audience isdid:web:<gateway host>, verified against the account's signing key. Channels are a small state machine with explicit EOF both ways and a 64 MB buffer cap. Git verbs are parsed and answered with pkt-line errors, and routing them to a tab stays behind--gituntil the git remote work onnmoo/git/remoteruns its round trip. 46 tests run in-process, andpnpm smokedrives the realsshandgitbinaries.- App: an opt-in account setting, "Allow SSH into open sandboxes", off by default. While it is on, each signed-in tab keeps one socket to the gateway, announces the project it has open, and serves shells on a
TerminalSessionand exec lines through a new quietexecLinepath that shares the terminal's bashkit setup. Git channels are refused with a clear message for now. - SDK and lexicons:
dev.nibling.ssh.attach,sshAccesson the settings record,attachToken,serviceDid, therpc:dev.nibling.ssh.attach?aud=*scope, andconfig.sshGateway(VITE_NIBLING_SSH_GATEWAYat build time,noneto disable). - Docs and CI: D25 in
docs/VISION.md, with a one-line amendment to D22.deploy.ymldeploys the gateway to Fly from the repo root on one machine. Needs theFLY_API_TOKENpipeline secret.
Verified #
- Every suite is green: gateway 46/46, sdk 150/150, lexicons
pnpm check, app 148/148 node tests and 223/223 Playwright specs, typecheck clean everywhere. - Against production, from a real OpenSSH client with the Tangled key and a real tab signed in with the new scope: the listing shows the open project,
node -p 6*7returns 42,process.exit(3)returns 3, and an interactive shell gets a pty whose resize reaches the process. - The gateway is already live at
ssh.nibling.devon Fly appnibling-ssh, dedicated IPv4 and IPv6, certificate issued, DNS-only records in Cloudflare.
Existing sessions re-consent #
The new OAuth scope means a signed-in session has to sign in again before its tabs can attach. The setting is off until someone turns it on, so nothing changes for anyone who does not.
Known gaps, deliberate for v1 #
- Typing
exitin an SSH shell does not end the channel; disconnect from the SSH side. - Exec stdin reaches only a single launched command, not a bash pipeline.
- The settings page shows the gateway host for the SSH command, which is wrong on loopback where the ports differ.
- A session with no tab open is refused with the address to open. The container tier (headless kernel on Node) stays in the unmerged D24 and D26 drafts.
- ssh2 has no post-quantum key exchange, so OpenSSH 10 prints its warning.
ssh handle@nibling.devwithout the subdomain needs Cloudflare Spectrum, which needs the Pro plan.
Follow-ups agreed with other branches #
- Presence:
Peer.agentfrom an SSHenvrequest (SetEnv NIB_AGENT=claude-code), gateway side in a follow-up here, tab side on top of this branch. - Git remote: the tab adapter to
servePackfrom@nibling/sdk/git-remoteafter PR #2.