kex_exchange_identification: Connection closed by remote host
kex_exchange_identification: Connection closed by remote host??? info "Problem environment"- expected environment: unixDetails of the problem / Steps to reproduce the errorSome time when you try to connect to github, you may get this error:kex_exchange_identification: Connection closed by remote hostTLDRAdd this to your ~/.ssh/config:Host github.com
Hostname 20.200.245.248
Port 443What I've done before the problem is solved (don't know which one worked):Close clash for windowscancel http_proxy and other proxy ports in shell config file (config.fish) and ~/.gitconfigdelete all content in ~/.ssh/known_hostsref: https://github.com/orgs/community/discussions/55269, use ssh -Tv -p 443 [email protected], or add this to ~/.ssh/config:Host github.com
Hostname 20.200.245.248
Port 443verified on 24/5/28, for a new user on Ubuntu, adding this content to config is useful.
verified on 24/7/24, worked for wsl when suddenly can't connect git by cli.Post testreopen clash for windows: still ok to sshgit clone: okgit pull and push: ok24.9.27windows 上和 wsl2 中无法访问阿里云服务器 sshsolve: 关闭了 Clash Verge 的服务模式(未关闭 tun)solve2: 开启服务模式 + TUN 并选择直连也可以。这台机子如果不开 TUN, wsl2 的网速异常龟速,即使 win 内的网速正常