错误提示

~ ❯ ssh -T git@github.com       
kex_exchange_identification: Connection closed by remote host
Connection closed by 198.18.0.7 port 22

解决方法

  1. 指定使用443端口

  2. 修改ssh默认行为

ssh -T -p 443 git@ssh.github.com 
vim ~/.ssh/config

末尾加入
Host github.com
    Hostname ssh.github.com
    Port 443
    User git