ssh connection “client_loop: send disconnect: Broken pipe” or “Connection reset by port 22”

I have been using ssh to access remote servers for many months, but recently I haven’t been able to establish a reliable connection. Sometimes I cannot login and get the message “Connection reset by port 22”, when I can login I get the error message “client_loop: send disconnect: Broken pipe” in a few minutes (even if the terminal is not idle).

My ~/.ssh/config file has:

Host *  

     ServerAliveInterval 300
     ServerAliveCountMax 2
     TCPKeepAlive yes

My /etc/ssh/sshd_config file has:

#ClientAliveInterval 300
#ClientAliveCountMax 3

I recently upgraded by xfinity plan to a faster speed and the problem started happening then. But xfinity insists the issue is on my end. Note that my roommate also has the same issue with ssh…

Is there something that I’m missing on my end? Any help would be greatly appreciated!
(I’m running on a Mac)

Go to Source
Author: Ashka Shah