Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh2 dependency does not seem to support older KEX algorithms #20

Open
ThePMO opened this issue May 6, 2024 · 0 comments
Open

ssh2 dependency does not seem to support older KEX algorithms #20

ThePMO opened this issue May 6, 2024 · 0 comments

Comments

@ThePMO
Copy link

ThePMO commented May 6, 2024

I have to work with a very old Solaris server as a target and I am stuck on the remote debugging setup.

This is the error message that is reported in the OUTPUT -> Extension Host:
2024-05-06 12:38:47.209 [error] Error: Handshake failed: no matching key exchange algorithm
at makeError (c:\Users\PA4698.vscode\extensions\coolchyni.beyond-debug-0.9.15\out\extension.js:11263:19)
at doFatalError (c:\Users<USER>.vscode\extensions\coolchyni.beyond-debug-0.9.15\out\extension.js:11300:17)
at handleKexInit (c:\Users<USER>.vscode\extensions\coolchyni.beyond-debug-0.9.15\out\extension.js:16608:16)
at Protocol.onKEXPayload (c:\Users<USER>.vscode\extensions\coolchyni.beyond-debug-0.9.15\out\extension.js:17899:18)
at NullDecipher.decrypt (c:\Users<USER>.vscode\extensions\coolchyni.beyond-debug-0.9.15\out\extension.js:12433:30)
at Protocol.parsePacket [as _parse] (c:\Users<USER>.vscode\extensions\coolchyni.beyond-debug-0.9.15\out\extension.js:19528:29)
at Protocol.parse (c:\Users<USER>.vscode\extensions\coolchyni.beyond-debug-0.9.15\out\extension.js:18322:20)
at Socket. (c:\Users<USER>.vscode\extensions\coolchyni.beyond-debug-0.9.15\out\extension.js:23923:25)
at Socket.emit (node:events:514:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Socket.push (node:internal/streams/readable:234:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)

Other than that there is no output on the DEBUG CONSOLE or OUTPUT -> BeyondDebug, only a toast "Disconnected from "

I am able to connect to other servers that have a more recent sshd, so I'm pretty sure the problem comes from the KEX algorithms

The Solaris server proposes the following:

debug2: peer server KEXINIT proposal
debug2: KEX algorithms: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa,ssh-dss
debug2: ciphers ctos: aes128-ctr,aes128-cbc,arcfour,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
debug2: ciphers stoc: aes128-ctr,aes128-cbc,arcfour,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
debug2: MACs ctos: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96
debug2: MACs stoc: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96

From what I can read about other extensions, I assume under the hood there is a dependency on ssh2, so I looked what it supports there:

kex - mixed - Key exchange algorithms.

Default list (in order from most to least preferable):

  • curve25519-sha256 (node v14.0.0+)
  • [email protected] (node v14.0.0+)
  • ecdh-sha2-nistp256
  • ecdh-sha2-nistp384
  • ecdh-sha2-nistp521
  • diffie-hellman-group-exchange-sha256
  • diffie-hellman-group14-sha256
  • diffie-hellman-group15-sha512
  • diffie-hellman-group16-sha512
  • diffie-hellman-group17-sha512
  • diffie-hellman-group18-sha512

Other supported names:

  • diffie-hellman-group-exchange-sha1
  • diffie-hellman-group14-sha1
  • diffie-hellman-group1-sha1

I see that what the server proposes is listed under "Other supported names". I have not figured out a way to test ssh2 directly, but my assumption is that these other supported names need to be enabled somehow when the Native Debug extension opens the ssh connection?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant