SSH Error | kex_exchange_identification: Connection closed by remote host Connection closed by 20.205.243.166 port 22
运行$ ssh -T git@github.com
报错:
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
解决方案:
- 检查公钥是否过期
- 是否使用代理软件(TUN模式代理全局),进而导致本地端口号指向放生改变
方案一: 切换为远程URL为HTTPS,不使用SSH
方案二: 建立配置文件 config
在目录~/.ssh/
下,把端口指向443
Host github.com
Hostname ssh.github.com
Port 443
参考
CSDN