On Mon, 24 Nov 2025, Werner Stolz via curl-users wrote:

We first encountered this error in 2022, and the only suggestion was to upgrade our version of curl. We have now done that, and the problem actually seems WORSE.

As you're using SFTP, I think this problem is within libssh2 and that a curl update does almost nothing for improving this case.

* libssh2 cryptography backend: openssl compatible
* User: USER
* Failure establishing ssh session: -5, Unable to exchange encryption keys
* closing connection #0
curl: (2) Failure establishing ssh session: -5, Unable to exchange encryption 
keys

This is libssh2 returning an error when it fails to establish an SSH session with the server.

libssh2 is an understaffed and resource drained project. I propose you roll up your sleeves and do some debugging of your own, and maybe check with other libssh2 users if they have seen something similar.

--

 / daniel.haxx.se || https://rock-solid.curl.dev
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to