From 65b4355a4dd41343b64a6b367516a155a5293f53 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Wed, 28 Oct 2026 10:54:25 -0500 Subject: [PATCH] fix(nixos): raise sshd MaxStartups to 200:30:500, add liveness tuning Fleet SSH bursts over Tailscale DERP still tripped the 100-connection unauthenticated cap during fleet-wide runs (dezren39/nix#1020). MaxStartups 100:30:250 -> 200:30:500. LoginGraceTime 120s -> 60s so unauthenticated slots recycle twice as fast under burst load. ClientAliveInterval 30 / ClientAliveCountMax 10: dead relay connections stop holding sessions open while quiet live sessions survive ~5 min of missed probes. MaxSessions 50 and UseDns off were already in place. Evaluated config verified on amd: all six settings present, format-check clean. --- nixos/services/default.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/nixos/services/default.nix b/nixos/services/default.nix index a863865287..bd3ecd4803 100644 --- a/nixos/services/default.nix +++ b/nixos/services/default.nix @@ -47,9 +47,19 @@ PermitRootLogin = "no"; PasswordAuthentication = false; # Agent fleets connect in bursts over slow relays (Tailscale DERP); - # stock MaxStartups drops those handshakes. Raised 2026-10-25. - MaxStartups = "100:30:250"; + # stock MaxStartups drops those handshakes. Raised 2026-10-25, + # raised again 2026-10-28 (Drew) after nix#1020: bursts through + # the tailnet still tripped the 100 cap during fleet-wide runs. + MaxStartups = "200:30:500"; MaxSessions = 50; + # Unauthenticated slots recycle in half the stock time, so a + # burst drains faster instead of piling up against MaxStartups. + LoginGraceTime = 60; + # Probe idle clients every 30s and drop ones that never answer: + # dead DERP/tailnet connections stop holding sessions open, + # live-but-quiet sessions survive 10 missed probes (~5 min). + ClientAliveInterval = 30; + ClientAliveCountMax = 10; }; hostKeys = [ # {