[GH-ISSUE #518] 1.7.HTTP(S)通过SSH中转-缺少加密算法 #420

Open
opened 2026-02-27 23:16:50 +03:00 by kerem · 0 comments
Owner

Originally created by @houchj on GitHub (Dec 31, 2022).
Original GitHub issue: https://github.com/snail007/goproxy/issues/518

按照-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: [curve25519-sha256@libssh.org 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: [curve25519-sha256@libssh.org 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 没有用,感觉应该是程序里面指定的算法,所以只能程序修改。

Originally created by @houchj on GitHub (Dec 31, 2022). Original GitHub issue: https://github.com/snail007/goproxy/issues/518 <!--- Provide a general summary of the issue in the Title above --> 按照-1.7.HTTP(S)通过SSH中转的使用方法-缺少加密算法 ## Expected Behavior <!--- Tell us what should happen --> 应该连接成功 ## Current Behavior <!--- Tell us what happens instead of the expected 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: [curve25519-sha256@libssh.org ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group-exchange-sha256] ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> 添加这些缺少的算法 ## Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> 1. 准备一个ssh server 1. 使用1.7.HTTP(S)通过SSH中转 中的方法连接 proxy http -T ssh -P "xxxx:22" -u user -A demo -t tcp -p ":28080" 1. 报错 1. ## Context (Environment) <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> 1. proxy version is : v? [v12.3](https://github.com/snail007/goproxy/releases/tag/v12.3) 1. full command is :? proxy http -T ssh -P "xxxx:22" -u user -A demo -t tcp -p ":28080" 1. system is : Ubuntu22,Win11 报同样的错误 1. 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: [curve25519-sha256@libssh.org ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1], server offered: [diffie-hellman-group-exchange-sha256] <!--- Provide a general summary of the issue in the Title above --> 按照-1.7.HTTP(S)通过SSH中转的使用方法-报错缺少加密算法 ## Detailed Description <!--- Provide a detailed description of the change or addition you are proposing --> 请添加相应的算法 ## Possible Implementation <!--- Not obligatory, but suggest an idea for implementing addition or change --> 请添加相应的算法到程序里面,好像修改系统级别的~/.ssh/config /etc/ssh/ssh_config 没有用,感觉应该是程序里面指定的算法,所以只能程序修改。
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#420
No description provided.