fancyss icon indicating copy to clipboard operation
fancyss copied to clipboard

开启科学上网的时候无法建立ssh链接

Open plutotree opened this issue 1 year ago • 4 comments

最近本机mac无法直接ssh到香港的云服务器,访问的时候会有下述提示,提示后链接被断开,kex_exchange_identification: Connection closed by remote host。使用ssh -v开关的时候,会看到链接是先建立成功的Connection established.,telnet也是正常的。

但是通过其他国内的云服务器中转再ssh是可以正常访问的,在工作的windows机器也可以访问。

尝试下述各种办法仍然无效:

  1. 移除默认的ssh秘钥访问,改成密码;
  2. 删除本地所有.ssh下的配置;
  3. 在.ssh配置中增加相关兼容性配置

今天对云服务器进行了重装之后发现仍然无法访问,甚至还更换了外网IP也无法访问,搜索发现有说是VPN引起的,尝试关掉了路由器上的插件,访问就正常了。

想问下有没有相同的问题,这里的原因是什么,如何解决?

另外通过增加白名单IP确认是可以解决的,同时也验证了的确是这里的代理问题。

plutotree avatar Sep 18 '23 14:09 plutotree

请问怎么关掉插件啊?我也出现了这个问题,用的clash X,试了各种方法都不行

Aikoin avatar Jan 17 '24 09:01 Aikoin

请问怎么关掉插件啊?我也出现了这个问题,用的clash X,试了各种方法都不行

插件首页,直接关掉选项,保存就可以了

plutotree avatar Jan 18 '24 01:01 plutotree

https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port config把22换成443, 其他根据自己配置, 目前这样可用, 据说GFW原因, https://github.com/orgs/community/discussions/55269 .

Host github.com
 User git
 Port 443
 HostName ssh.github.com

leezicai avatar Feb 01 '24 03:02 leezicai

https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port config把22换成443, 其他根据自己配置, 目前这样可用, 据说GFW原因, https://github.com/orgs/community/discussions/55269 .

Host github.com
 User git
 Port 443
 HostName ssh.github.com

靴靴!!我也搜到了,可行!!

Aikoin avatar Feb 01 '24 03:02 Aikoin