From 3dc80342f87699b71df06b34632a73f30db96db6 Mon Sep 17 00:00:00 2001 From: Kristof Provost Date: Thu, 13 Feb 2025 21:36:14 +0100 Subject: [PATCH] image: improve the autossh behaviour Poll regularly and occasionally automatically reconnect. We've seen at least some instances of ssh remaining up but the reverse tunnel becoming unusable. Hopefully this will improve things. This can be recovered by terminating the ssh process on kosmos, but reconnection takes a while. --- image/overlay/domotica/etc/rc.d/autossh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/image/overlay/domotica/etc/rc.d/autossh b/image/overlay/domotica/etc/rc.d/autossh index a91df8d..cb149bb 100755 --- a/image/overlay/domotica/etc/rc.d/autossh +++ b/image/overlay/domotica/etc/rc.d/autossh @@ -18,7 +18,8 @@ autossh_start() /usr/local/bin/sudo -u kp \ /usr/local/bin/tmux new-session -d \ - "autossh -M 0 -p 2207 -N -R ${control_port}:localhost:22 \ + "AUTOSSH_POLL=120 AUTOSSH_MAXLIFETIME=28800 \ + autossh -M 0 -p 2207 -N -R ${control_port}:localhost:22 \ -R ${http_port}:localhost:8123 \ -o ExitOnForwardFailure=yes \ domotica@kosmos.sigsegv.be" -- 2.51.0