I have not had a problem with ssh and github until a recent upgrade to Mojave - I regenerated several ssh keys but I get the same errors. Below is the end of my readout from: ssh -vT git@github.com It authenticates but then hangs and finally returns the broken pipe message.
 debug1: Server accepts key: pkalg ssh-rsa blen 535
 debug1: Authentication succeeded (publickey).
 Authenticated to github.com ([192.30.253.112]:22).
 debug1: channel 0: new [client-session]
 debug1: Entering interactive session.
 debug1: pledge: network
 debug1: Sending environment.
 debug1: Sending env LANG = en_US.UTF-8
 debug1: Sending env LC_CTYPE = en_US.UTF-8
 packet_write_wait: Connection to 192.30.253.112 port 22: Broken pipe
Any suggestions?
 
    