ssh_exchange_identification: Connection closed by remote host

17 篇文章 0 订阅
13 篇文章 0 订阅

在使用ncat让git的ssh协议走上代理,遇到如下错误
ssh_exchange_identification: Connection closed by remote host
在这里插入图片描述
我的~/.ssh/config

Host github.com
    Hostname github.com
    User git
    IdentityFile ~/.ssh/id_ed25519
    ProxyCommand E:/Applications/nmap-7.91/ncat.exe --proxy 127.0.0.1:8889 --proxy-type socks5 %h %p

不知道是什么问题,经过多方搜索,终于找到了答案,是ncat本身的问题
https://github.com/nmap/nmap/issues/2149
这issue是最近才提出的,我好几个月前就遇到了这个问题,没想到居然是ncat的问题,哼哼哼
经过测试7.91和7.90版本都存在问题,7.80版本可以正常使用
在这里插入图片描述
只需要安装7.80版本的nmap,修改~/.ssh/config即可

Host github.com
    Hostname github.com
    User git
    IdentityFile ~/.ssh/id_ed25519
    ProxyCommand E:/Applications/nmap-7.80/ncat.exe --proxy 127.0.0.1:8889 --proxy-type socks5 %h %p
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值