From: Kristof Provost Date: Thu, 13 Feb 2025 20:36:14 +0000 (+0100) Subject: image: improve the autossh behaviour X-Git-Url: https://git.sigsegv.be/?a=commitdiff_plain;h=3dc80342f87699b71df06b34632a73f30db96db6;p=pennestraat-domotica 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. --- 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"