How to maintain a persistent SSH connection?

Sam George
Wed, 15 Nov 2017 21:37:30 -0000

On 11/15/2017 6:08 AM, martin f krafft wrote:

> I'm tasked with establishing a persistent SSH connection across
> a very unreliable link, for a remote port forward (always port
> 2217). I figured I'd use ServerAliveInterval to make sure that the
> ssh(1) process dies when the connection appears down, and I use
> systemd to restart it in this case. This works fine.

Have you looked at using mosh?  It's very good with unreliable connections.

-Sam George