14 years ago, i was using auto ash to keep SSH tunnels up; but at some point (quite far back - perhaps 2016?) ssh gained everything needed to do this internally <i>except</i> the restart.<p>At this point I configure all of the keep alive and retry options in ssh_config and sshd_config, and use<p><pre><code> While true; do ssh user@host ; sleep 10; done
</code></pre>
To get the same effect, but with much more flexibility - e.g. alternating connection addresses on a multihomed host, add logging, run from daemontools or systemd unit instead of a loop and let them track the process and restart, etc.