Skip to content

如何解决 kex_exchange_identification: Connection closed by remote host 的问题 #81

@hawtim

Description

@hawtim

背景

在路由器上挂了 shellclash 来做流量代理,日常开发涉及跟 github 的 pull/push 等操作都会提示我下面的信息。

image

后边在网上搜了一下,发现代理服务器(机场)会禁用 22 端口。

解决方案

先测试通过 https 端口的 ssh 是否可行,请运行以下命令:

$ ssh -T -p 443 git@ssh.github.com

如果 https 端口是通的,你会看到以下的信息:

image

通过 ssh 配置文件配置

请参考: https://docs.github.com/zh/authentication/troubleshooting-ssh/using-ssh-over-the-https-port#enabling-ssh-connections-over-https

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions