goproxy icon indicating copy to clipboard operation
goproxy copied to clipboard

1.7.HTTP(S)通过SSH中转-缺少加密算法

Open houchj opened this issue 1 year ago • 0 comments

按照-1.7.HTTP(S)通过SSH中转的使用方法-缺少加密算法

Expected Behavior

应该连接成功

Current Behavior

ERROR err : run service [http:http] fail, ERR:http servcie fail, ERR: init service fail, ERR: ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [[email protected] ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group-exchange-sha256]

Possible Solution

添加这些缺少的算法

Steps to Reproduce

  1. 准备一个ssh server
  2. 使用1.7.HTTP(S)通过SSH中转 中的方法连接 proxy http -T ssh -P "xxxx:22" -u user -A demo -t tcp -p ":28080"
  3. 报错

Context (Environment)

  1. proxy version is : v? v12.3
  2. full command is :? proxy http -T ssh -P "xxxx:22" -u user -A demo -t tcp -p ":28080"
  3. system is : Ubuntu22,Win11 报同样的错误
  4. full log is: ? 2022/12/30 22:52:51.460465 WARN connect to ssh &[xxxx:22] fail 2022/12/30 22:52:51.460576 ERROR err : run service [http:http] fail, ERR:http servcie fail, ERR: init service fail, ERR: ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [[email protected] ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group-exchange-sha256]

按照-1.7.HTTP(S)通过SSH中转的使用方法-报错缺少加密算法

Detailed Description

请添加相应的算法

Possible Implementation

请添加相应的算法到程序里面,好像修改系统级别的~/.ssh/config /etc/ssh/ssh_config 没有用,感觉应该是程序里面指定的算法,所以只能程序修改。

houchj avatar Dec 31 '22 02:12 houchj