A direct browser SSH + Eternal Terminal client with native WebAuthn hardware key authentication — and zero custom server code. Why wwwet? In a world of long-running coding agents and remote dev boxes, you often want to check in on a tmux session (or tiri) from devices outside your main workstation — like a Chromebook, tablet, or phone where native Eternal Terminal isn't available. Most web-based SSH tools force you to run a custom backend that terminates SSH on the server side (introducing a trusted middleman) and/or drop your session the moment Wi-Fi blinks. wwwet avoids both: Zero custom server code — Runs against stock sshd, etserver, and websockify behind a static file server like Caddy. Hardware-backed auth directly to sshd — Uses native OpenSSH webauthn-sk-ecdsa-sha2-nistp256@openssh.com (ES256 / P-256). Private keys never leave your security key or device secure enclave. True end-to-end encryption — Both SSH (curve25519-sha256 / aes256-gcm@openssh.com) and Eternal Terminal (xsalsa20poly1305) terminate inside the browser. websockify is just a dumb TCP-to-WebSocket pipe. Session roaming — Backed by Eternal Terminal, so sessions survive network switches, sleep/wake cycles, and flaky mobile connections. Lightweight static PWA — Pure TypeScript + WebCrypto + xterm.js (no heavy Go/C WASM runtime), installable as a standalone web app. See docs/market-comparison.md for a detailed comparison against sshterm, Chrome Secure Shell (nassh), Teleport, Cloudflare Access, Tailscale SSH, and self-hosted web terminals. How It Works flowchart LR subgraph Browser["Browser (Static PWA)"] UI["xterm.js"] SSH["SSH-2 Client (WebCrypto + WebAuthn)"] ET["ET Client (XSalsa20-Poly1305)"] Key["FIDO2 / Passkey (P-256)"] Key -.->|Signs SSH userauth| SSH UI <--> ET end subgraph Server["Your Server (Stock Services Only)"] Caddy["Caddy (HTTPS + Static Assets)"] WS["websockify (WS ↔ TCP)"] SSHD["sshd :22"] ETD["etserver :2022"] Caddy -->|/ws| WS WS -->|localhost-ssh| SSHD WS -->|localhost-et| ETD end SSH ==>|"1. Auth & bootstrap etterminal"| Caddy ET ==>|"2. Roaming encrypted terminal"| Caddy Register once: Generate a P-256 WebAuthn credential in the browser and paste the resulting sk-ecdsa-sha2-nistp256@openssh.com line into ~/.ssh/authorized_keys on your server. SSH bootstrap: On connect, wwwet opens an E2E-encrypted SSH-2 connection through websockify to sshd, verifies your pinned host key fingerprint, authenticates with your hardware key, and launches etterminal to obtain a one-time session ID and passkey. Roaming terminal: wwwet disconnects SSH and attaches directly to etserver over a second WebSocket. If your network drops, Eternal Terminal automatically reconnects and catches up seamlessly. Security Model wwwet requires a WebAuthn authenticator supporting P-256 (ES256, OpenSSH's sk-ecdsa-sha2-nistp256@openssh.com). Private keys never leave your authenticator, and sshd cryptographically verifies the hardware signature on every new session bootstrap. Best practices you should still follow: Pin your SSH host key fingerprint (SHA256:...) in the UI to prevent MITM attacks. Serve over HTTPS with the strict Content Security Policy (CSP) headers shown in the Caddy deployment section below (WebAuthn also requires a secure context outside localhost). Threat model — what would it take to compromise a session? Because there is no custom backend terminating SSH, an attacker would have to compromise one of the following: The static web assets served to your browser (e.g., tampering with JS to exfiltrate the session). websockify or the reverse proxy in a way that allows script injection into the origin. Your WebAuthn authenticator / secure enclave (leaking the private key) or your browser (spoofing WebAuthn). sshd or etserver itself (bypassing authentication). Requirements On the target server: OpenSSH sshd (with webauthn-sk-ecdsa-sha2-nistp256@openssh.com support) Eternal Terminal websockify + a TLS reverse proxy such as Caddy (for production HTTPS) On the client: A modern browser with WebCrypto and WebAuthn support A P-256 WebAuthn authenticator (Tested on YubiKey / FIDO2 key, Touch ID, iPad) Quick Start Try locally (Nix) Run a standalone websockify server with bundled static assets pointing at local sshd (127.0.0.1:22) and etserver (127.0.0.1:2022): nix run . -- --listen 127.0.0.1:8765 Open http://localhost:8765, click 1. Register Hardware WebAuthn Key (P-256), add the printed key to ~/.ssh/authorized_keys, enter your username and host key fingerprint, and click 2. Connect via Hardware Key. Local Development Start the auto-reloading Vite dev server (includes a built-in /ws?token=... bridge to localhost-ssh and localhost-et): npm install npm run dev Or via Nix: nix run .#dev Then open http://127.0.0.1:5173. WWWET_DEV_HOST / WWWET_DEV_PORT: Listen host and port (default: 127.0.0.1:5173) WWWET_SSH_TARGET / WWWET_ET_TARGET: Override default localhost-ssh (127.0.0.1:22) and localhost-et (127.0.0.1:2022) targets WWWET_TARGET_CONFIG: Path to a websockify TokenFile (token: host:port lines) WWWET_WS_TARGET: Proxy /ws to an external websockify server (e.g. http://127.0.0.1:8765) instead of using the built-in TCP bridge Deployment with Caddy WebAuthn requires HTTPS outside of localhost. In production, bind websockify to loopback and let Caddy handle TLS, security headers, static assets, and WebSocket proxying. 1. Build the static assets npm run build This outputs the static bundle to dist/. Configure your target list in public/config.json (or edit dist/config.json after building). 2. Run websockify Create a target config file (e.g. websockify-targets.conf) matching the tokens in public/config.json: localhost-ssh: 127.0.0.1:22 localhost-et: 127.0.0.1:2022 Start websockify bound to loopback: websockify --target-config /path/to/websockify-targets.conf 127.0.0.1:8765 3. Configure Caddy Caddyfile: ssh.example.com { header { Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; connect-src 'self'; img-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'self'" X-Content-Type-Options "nosniff" Referrer-Policy "no-referrer" } handle /ws { reverse_proxy 127.0.0.1:8765 } handle { root * /path/to/wwwet/dist file_server } } If you add this repository as a flake input named wwwet, you can configure Caddy and websockify in NixOS like this: { pkgs, wwwet, ... }: let websockifyTargets = pkgs.writeText "websockify-targets.conf" '' localhost-ssh: 127.0.0.1:22 localhost-et: 127.0.0.1:2022 ''; in { systemd.services.websockify = { enable = true; wantedBy = [ "multi-user.target" ]; after = [ "network.target" "sshd.service" "et.service" ]; serviceConfig = { DynamicUser = true; ExecStart = "${pkgs.python3Packages.websockify}/bin/websockify --target-config ${websockifyTargets} 127.0.0.1:8765"; Restart = "always"; }; }; services.caddy = { enable = true; virtualHosts."ssh.example.com".extraConfig = '' header { Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; connect-src 'self'; img-src 'self'; object-src 'none'; frame-ancestors 'none'; base-uri 'self'" X-Content-Type-Options "nosniff" Referrer-Policy "no-referrer" } handle /ws { reverse_proxy 127.0.0.1:8765 } handle { root * ${wwwet.packages.${pkgs.stdenv.hostPlatform.system}.default} file_server } ''; }; } Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).
AI NEWS JOURNAL
Hacker News Show HNAI NEWS / JOURNAL
Show HN: Wwwet – web based webauthn and SSH and et client
Article URL: https://github.com/blmarket/wwwet Comments URL: https://news.ycombinator.com/item?id=50684808 Points: 1 # Comments: 0
翻訳サービスが停止中のため原文を表示しています。