SSH broken pipes mac osx , keep disconnecting after a while

fix: 

add the following in ~/.ssh/config

Host *
ServerAliveInterval 240
ServerAliveCountMax 3
TCPKeepAlive no

Remember to START the new Terminal