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

解决方案:

  1. 检查公钥是否过期
  2. 是否使用代理软件(TUN模式代理全局),进而导致本地端口号指向放生改变

方案一: 切换为远程URL为HTTPS,不使用SSH
方案二: 建立配置文件 config 在目录~/.ssh/下,把端口指向443

Host github.com
Hostname ssh.github.com
Port 443

参考
CSDN

posted @ 2023-03-20 17:33  技术聚光灯  阅读(4247)  评论(0编辑  收藏  举报