You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every source must exist, fetch successfully, and contain valid public key
225
+
lines or startup fails. Authorized-key options such as `command=` and
226
+
`from=` are rejected because the built-in server does not implement them.
227
+
Running `tailcat serve ssh` without `--ssh-authorized-keys` also fails; use the
228
+
explicit `no-auth-ssh` service when the tunnel identity alone is sufficient.
229
+
200
230
### Auth-free SSH server
201
231
202
-
On Linux and macOS, you can run an SSH server too with no auth. (If you want auth, you can just `tailcat serve 22` and proxy to your system SSH server)
232
+
On Linux, macOS, and Windows, you can also explicitly run the SSH server with
233
+
no client authentication. The encrypted tunnel provides the client identity.
203
234
204
235
```sh
205
236
$ tailcat serve no-auth-ssh
@@ -253,8 +284,8 @@ The server confines all paths to the served directory (via Go's
253
284
`os.Root`), so neither `..` nor symlinks escape it. The file service
254
285
speaks SFTP, so the stock `sftp` and `scp` clients also work against
255
286
it, given a ProxyCommand that pipes through tailcat (the same trick
256
-
`tailcat cp` and `tailcat ssh` use). A `no-auth-ssh` server serves
257
-
SFTP too, with the same access as the shell.
287
+
`tailcat cp` and `tailcat ssh` use). Both `ssh` and `no-auth-ssh`
288
+
servers serve SFTP too, with the same access as the shell.
258
289
259
290
Transfers are not compressed: the SFTP protocol has no compression
260
291
of its own, and the SSH transport here doesn't either (Go's SSH
@@ -341,8 +372,8 @@ A server can print the long self-contained form directly with the
341
372
342
373
## Key Management
343
374
344
-
A server's tailcat address is derived from its WireGuard key, so
345
-
the key you use determines who can reach you:
375
+
A server's tailcat address contains its WireGuard public key and an independent
376
+
WireGuard pre-shared key, so the saved key material determines who can reach you:
346
377
347
378
***Ephemeral keys (the default):** each server run generates a fresh key in
348
379
memory and prints an address nobody has ever seen. When the process exits,
@@ -359,6 +390,11 @@ The CLI says at startup which kind it's using, so you know whether you're
359
390
starting a fresh single-use server or re-listening on an address you may
360
391
have shared in the past.
361
392
393
+
WireGuard pre-shared keys are enabled by default and strongly recommended. For
394
+
compatibility with tailcat clients v0.5.0 and earlier, `--psk=false` on `serve`
395
+
or `genkey` produces shorter addresses, but removes post-quantum protection and
396
+
protection from public DERP operators that observe the peers' public keys.
397
+
362
398
```sh
363
399
$ tailcat genkey --key=default --region=nyc
364
400
# prints the tailcat address; key saved to ~/.config/tailcat/keys/default.private.json
@@ -597,12 +633,19 @@ followed by base64-encoded [CBOR](https://cbor.io/) containing:
597
633
598
634
- The server's WireGuard public key (Curve25519, 32 bytes)
599
635
- A separate path-discovery public key (Curve25519, 32 bytes)
636
+
- By default, an independent WireGuard pre-shared key (256 random bits),
637
+
which prevents a DERP operator that observes the peers' public keys from
638
+
joining the tunnel and provides post-quantum protection against recorded
639
+
traffic
600
640
- DERP info. Either:
601
641
1. a small integer referencing one of the default [Tailscale-run tailcat servers](https://tailcat.dev/derpmap.json), or
602
642
2. full DERP server metadata, to either use a custom DERP server, or to avoid the client needing a potential round-trip to fetch the latest DERP map (the `tailcat serve --full-address` flag and the `tailcat resolve` subcommand produce this form)
603
643
604
-
A typical tailcat address with just an integer region ID is around 95 bytes. With
605
-
embedded DERP node details it's longer but self-contained.
644
+
A typical tailcat address with just an integer region ID is around 140 bytes.
645
+
With embedded DERP node details it's longer but self-contained.
646
+
647
+
The default address is a secret bearer capability because it contains the
648
+
pre-shared key. Share it only with clients that should be able to connect.
606
649
607
650
### Network stack
608
651
@@ -624,15 +667,17 @@ without the control plane.
624
667
625
668
### Connection flow
626
669
627
-
1.**Server starts.** It generates (or loads) a WireGuard keypair,
628
-
connects to a DERP relay, and prints its tailcat address to stderr.
629
-
It then waits for clients.
670
+
1.**Server starts.** It generates (or loads) a WireGuard keypair and, by
671
+
default, a pre-shared key, connects to a DERP relay, and prints its tailcat
672
+
address to stderr. It then waits for clients.
630
673
631
-
2.**Client parses the tailcat address** to learn the server's public key and
632
-
path-discovery key, plus its DERP region. It generates its own ephemeral
633
-
keypair and connects to the same DERP relay. The separate path-discovery
634
-
key can appear in cleartext direct-path disco frames without revealing the
635
-
WireGuard public key that acts as the unlisted connection capability.
674
+
2.**Client parses the tailcat address** to learn the server's public key,
675
+
path-discovery key, optional pre-shared key, and DERP region. It generates
676
+
its own ephemeral keypair and connects to the same DERP relay. The separate
677
+
path-discovery key can appear in cleartext direct-path disco frames without
678
+
revealing the WireGuard public key. The pre-shared key remains the secret
679
+
connection capability even when a relay operator observes both peers'
680
+
public keys.
636
681
637
682
3.**Discovery handshake.** The client sends a "**Meow**" ping message
638
683
to the server through the
@@ -641,10 +686,10 @@ without the control plane.
641
686
network map, reconfigures the WireGuard engine, and replies with a
642
687
"**Meowed**" acknowledgment.
643
688
644
-
4.**WireGuard tunnel.** With both sides configured as WireGuard
645
-
peers, the standard WireGuard handshake proceeds (routed through
646
-
DERP initially). Once complete, the tunnel is up and encrypted
647
-
traffic can flow.
689
+
4.**WireGuard tunnel.** With both sides configured as WireGuard peers using
690
+
the address's pre-shared key when present, the WireGuard handshake proceeds
691
+
(routed through DERP initially). Once complete, the tunnel is up and
692
+
encrypted traffic can flow.
648
693
649
694
5.**NAT traversal.** In parallel, each side advertises its UDP
650
695
endpoints (public IP:port learned via STUN, plus local interface
0 commit comments