Keep SSH Connections Alive When Behind Proxy
On Mac fire up Terminal and use vim to edit the file (username is your account):
vim /Users/username/.ssh/config
In general you can set the interval for any host:
Host* ServerAliveInterval 30
Or you may have a server already defined that you wish to apply this property to:
MyServer ServerAliveInterval 30