in Uncategorized

SSH Keep-Alive for Mac OS X

I discovered a while back that my SSH sessions weren’t staying active despite having the appropriate settings in /etc/ssh/ssh_config.

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 “" just for completeness and it now keeps my sessions alive.)