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.
/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"