Write failed: Broken pipe issue on Mac OS X

If you ssh to your server using Terminal or iTerm, have you ever encountered this kind of problem?
If you do, here I give you a solution (maybe a solution. it works for me at the meantime) on how to solve this issue.

Open you terminal, and insert this command to your terminal and hit enter:

sudo sysctl -w net.inet.tcp.always_keepalive=9999

Any Comments?