interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / infra / hub / sshd-forward-keepalive.conf

17 lines · 1282 bytes Raw Blame History
1# /etc/ssh/sshd_config.d/40-forward-keepalive.conf on the hub Pi. forge-iplreach (L1008 QW1, card t_0ef9cf5d).
2# Installed by infra/hub/sshd-keepalive-apply.sh; removed by infra/hub/sshd-keepalive-rollback.sh.
3#
4# Why: the Spark keeps reverse tunnels into the hub with `ssh -R` (aien-floor-edge 4748, forged-tunnel
5# 18480, rad-hub-tunnel 18776). When the hub stalls or the link drops, the Spark side gives up after
6# its ServerAlive budget and reconnects, but the hub's sshd kept the dead session, and with it the
7# forwarded port, until the kernel's TCP keepalive gave up: 7200 s + 9 x 75 s = 7875 s (2 h 11 min).
8# Every reconnect in that window failed with "remote port forwarding failed for listen port ...".
9# Measured 2026-11-08: aien-floor-edge restarted 1296 times between 13:52:49 and 15:59:43 (CST).
10#
11# With these lines sshd itself asks each client every 15 s and drops a session once 4 asks in a row
12# have gone unanswered, which frees its forwarded ports: about 75 s after the client goes silent
13# (the drop happens at the 5th ask; test/sshd-keepalive.sh measured 76 s). A live client answers
14# every ask, so working sessions are unaffected. First match wins in sshd_config, so this file sorts
15# before 50-cloud-init.conf.
16ClientAliveInterval 15
17ClientAliveCountMax 4