Mantenere attive le sessioni ssh
As reported by several sources
- https://patrickmn.com/aside/how-to-keep-alive-ssh-sessions/
- https://www.howtogeek.com/howto/linux/keep-your-linux-ssh-session-from-disconnecting/
- https://stackoverflow.com/questions/25084288/keep-ssh-session-alive
Set the maximum number of tolerable unanswered keepalives to avoid that a unresponsive server hangs your session.
This 3 lines in your ~/.ssh/config
are sufficient for this purpose.
Host * ServerAliveInterval 300 ServerAliveCountMax 2