ssh2: How do I recover from KEY_EXCHANGE_FAILED?

I’m using ssh2 to stream files to sftp. All my test cases pass except for the one where I attempt to upload 1000 files using a new connection each time. The problem is that signature occasionally verification fails. Even though I’m listening for errors on the connection, I don’t receive a notification and so never execute a callback.

qsftp:tests DEBUG: Checking host key format +0ms
qsftp:tests DEBUG: Checking signature format +0ms
qsftp:tests DEBUG: Verifying host fingerprint +0ms
qsftp:tests DEBUG: Host accepted by default (no verification) +0ms
qsftp:tests DEBUG: Verifying signature +6ms
qsftp:tests DEBUG: Signature could not be verified +0ms
qsftp:tests DEBUG: Outgoing: Writing DISCONNECT (KEY_EXCHANGE_FAILED) +0ms

Is there another event / emitter I should be listening to?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 32 (13 by maintainers)

Most upvoted comments

You were right. re-installing ssh2 did the trick.

Thanks!