I am using
autossh to build a reverse ssh tunnel but from time to time the tunnel stops working and I need to kill autossh and start it again.
/etc/cron.d/autossh @reboot autossh -f -nNT -R 3269:intranet.example.com:3269 public.example.com &
autossh seems to remain in a strange state, where the forwarded port is still open but you get no response from the other side. By restarting autossh this is solved.
How can I prevent this problem from occurring?