I discovered a while back that my SSH sessions weren’t staying active despite having the appropriate settings in
The other day, I found an article on Google with another way to get keep-alives working – luckily this seems to have worked perfectly.
You need to edit
~/.ssh/config (create it if it doesn’t exist), and add the following lines:
ServerAliveInterval 300 ServerAliveCountMax 3
(I quit “
Terminal.app" just for completeness and it now keeps my sessions alive.)