Re:Outrun: Execute local command using processing power of a...
by martinflack on Friday March 19, 2021 @12:47AM
(#26510231)
> It's something that can probably be fixed with the right ssh_config/sshd_config, but I can't for the life of me figure out the right incantations.
Have you tried something like this? It does a common TCP/IP socket for each remote host and does application-level pings every 4 minutes to keep the socket active. Solved most of my "stay connected" issues.
Host *
ControlPath ~/.ssh/cm-%r@%h:%p
ControlMaster auto
ControlPersist 10s
ServerAliveInterval 240
For now, I just habitually do M-x tramp-cleanup-all-connections whenever I stop actively working with remote files, and let Emacs reconnect automatically when I save a remote file or refresh a remote folder listing.
(Incidentally, half of my use of TRAMP went away once I managed to configure a 256-color terminal on my sidearm; with that, Emacs in terminal mode looks almost indistinguishable from a GUI session.)