git push ssh broken pipe error / http curl ssl read error

First, sshd is for configuring the ssh daemon, on the server side, which you are not (you are a client)

Second, your config should not use github.com as an Host entry.
Use a custom key like mygithub.
And add User git and HostName github.com in that section.

Your ~/.ssh/config should then be:

Host mygithub
   HostName github.com
   PubKeyAuthentication yes
   IdentityFile ~/.ssh/id_rsa
   ServerAliveInterval 300
   TCPKeepAlive no
   #ServerAliveCountMax 2400
   User git

Then change your URL:

git remote set-url origin mygithub:MyAccount/MyRepo.git

And try again.

If the issue persists, as mentioned here, it is a network issue, and the OP confirms.


Indeed, as pointed out by @VonC, the packet_write_issue from pushing over ssh and the SSLRead() return error from pushing via https were caused by a bad internet connection. In my case, I improved the network connection by plugging the internet cable directly into the router and not through the wall connections we have at home. Finally, this allowed me to upload my files to github.com.