github 连接超时 ssh: connect to host github.com port 22: Connection timed out

Posted 小生凡一

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了github 连接超时 ssh: connect to host github.com port 22: Connection timed out相关的知识,希望对你有一定的参考价值。

问题 ssh: connect to host github.com port 22: Connection timed out

今天想clone自己的仓库下来的时候,发现这个错误,意思是说22端口寄了!

我们只需要更换端口就好了,更换成443端口就好了

vim ~/.ssh/config

加入下面的信息
:wq

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


验证:

ssh -T git@github.com

这样就可以了

以上是关于github 连接超时 ssh: connect to host github.com port 22: Connection timed out的主要内容,如果未能解决你的问题,请参考以下文章