A direct browser SSH + Eternal Terminal client with native WebAuthn hardware key authentication — and zero custom server code.
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, andwebsockifybehind a static file server like Caddy. - Hardware-backed auth directly to
sshd— Uses native OpenSSHwebauthn-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.websockifyis 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.
flowchart LR
subgraph Browser["Browser (Static PWA)"]
UI["xterm.js"]
SSH["SSH-2 Client<br/>(WebCrypto + WebAuthn)"]
ET["ET Client<br/>(XSalsa20-Poly1305)"]
Key["FIDO2 / Passkey<br/>(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.comline into~/.ssh/authorized_keyson your server. - SSH bootstrap : On connect,
wwwetopens an E2E-encrypted SSH-2 connection throughwebsockifytosshd, verifies your pinned host key fingerprint, authenticates with your hardware key, and launchesetterminalto obtain a one-time session ID and passkey. - Roaming terminal :
wwwetdisconnects SSH and attaches directly toetserverover a second WebSocket. If your network drops, Eternal Terminal automatically reconnects and catches up seamlessly.
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 theCaddy 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).
websockifyor 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).
sshdoretserveritself (bypassing authentication).
On the target server:
- OpenSSH
sshd(withwebauthn-sk-ecdsa-sha2-nistp256@openssh.comsupport) - 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)
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.
Start the auto-re 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.
Optional development environment variables #
WWWET_DEV_HOST/WWWET_DEV_PORT: Listen host and port (default:127.0.0.1:5173)WWWET_SSH_TARGET/WWWET_ET_TARGET: Override defaultlocalhost-ssh(127.0.0.1:22) andlocalhost-et(127.0.0.1:2022) targetsWWWET_TARGET_CONFIG: Path to awebsockify`` TokenFile(token: host:portlines)WWWET_WS_TARGET: Proxy/wsto an externalwebsockifyserver (e.g.http://127.0.0.1:8765) instead of using the built-in TCP bridge
WebAuthn requires HTTPS outside of localhost. In production, bind websockify to loopback and let Caddy handle TLS, security headers, static assets, and WebSocket proxying.
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).
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
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).