kex_exchange_identification: Connection closed by remote host

出现这个原因有多种可能,我出现这个原因是因为使用了机场的代理服务,代理服务节点禁止了github的ssh连接。解决办法:
修改 .ssh/config

Host github.com
  HostName ssh.github.com
  User git
  Port 443

再测试: ssh -T [email protected] 成功!

参考:

  • [https://www.v2ex.com/t/290545]
  • [https://docs.github.com/cn/authentication/troubleshooting-ssh/using-ssh-over-the-https-port]

你可能感兴趣的:(kex_exchange_identification: Connection closed by remote host)