平时使用ssh协议来访问github与gitlab上的项目,近期发现如果使用ssh协议,会碰到这样的错误:
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
fatal: Could not read from remote repository.
解决方法是,在~/.ssh/config
下添加配置:
Host github.com
Hostname ssh.github.com
Port 443
Host gitlab.com
Hostname altssh.gitlab.com
Port 443
这样就可以通过https来访问,绕过阻断。
但我的问题是,针对一般的ssh协议,现在的阻拦这么厉害吗?有没有正常使用ssh来直接访问的操作方案呢?