You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running libssh2 on an ARM development board and I'm having a problem with not being able to exchange keys. But I can't find a solution. When calling the "libssh2_session_handshake" function it keeps returning -8. Can anyone tell me how to solve this problem, thanks a lot!
Which libssh2 version and crypto-backend/version is this happening with?
This is the version of the target host.
Versions I compiled: libssh2-1.11.0 and openssl1.1.1d
After I created the rsa key pair using ssh-keygen. The default address where the key pair is saved is "/root/.ssh/" I don't know if this has any effect. Then I gave the key pair "777" permissions. But it still doesn't work.
I've tried using versions 1.8.0 through 1.11.0, and they all fail without exception. However, when I use the lower versions I no longer get "key exchange failed" errors, but "free" and "malloc" errors. I don't understand why this is happening.
My workaround is avoiding deffie-hellman-group-exchange-sha256, either by selecting a different preferred method with libssh2_session_method_pref or by adding KexAlgorithms -diffie-hellman-group-exchange-sha256 to sshd_config.
Activity
vszakats commentedon Apr 16, 2024
Which libssh2 version and crypto-backend/version is this happening with?
PengShiJin commentedon Apr 17, 2024
This is the version of the target host.

Versions I compiled: libssh2-1.11.0 and openssl1.1.1d
After I created the rsa key pair using ssh-keygen. The default address where the key pair is saved is "/root/.ssh/" I don't know if this has any effect. Then I gave the key pair "777" permissions. But it still doesn't work.

Can anyone help me with why this is happening?
victorstewart commentedon Apr 19, 2024
i'm getting the same failure #1369 (comment)
PengShiJin commentedon Apr 20, 2024
I've tried using versions 1.8.0 through 1.11.0, and they all fail without exception. However, when I use the lower versions I no longer get "key exchange failed" errors, but "free" and "malloc" errors. I don't understand why this is happening.
YiShuiHanFeng commentedon May 16, 2024
i have the same problem in windows when libssh2_session_handshake excute.The version is 1.11.0. I dont understand Why.
logmanoriginal commentedon Jun 1, 2024
Just putting this out here: I had a similar issue in version 1.11.0 on Windows, using the WINCNG backend.
The debug trace showed:
My workaround is avoiding
deffie-hellman-group-exchange-sha256, either by selecting a different preferred method withlibssh2_session_method_prefor by addingKexAlgorithms -diffie-hellman-group-exchange-sha256tosshd_config.tests: Fix unable to exchange encryption keys