question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I recover from KEY_EXCHANGE_FAILED?

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:32 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
skuchukcommented, Mar 28, 2016

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

Thanks!

0reactions
mscdexcommented, Mar 28, 2016

@skuchuk Those aren’t valid versions for ssh2 and ssh2-streams. I would guess those values are actually the npm version. To see module versions you can do npm ls in your project’s root directory.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: SSH key exchange failed - Cisco Community
Solved: Hi, I am using nso-5.7.1.linux.x86_64.signed.bin in the Local VM, here I am getting below ssh-key Error.
Read more >
Recover Exchange servers - Microsoft Learn
You can recover a lost Exchange server by using the /Mode:RecoverServer switch in unattended mode (from the command line) of Exchange Setup.
Read more >
Fix Putty's 'Key Exchange Algorithm Agreement' error
The first remedy to try is to download a new version of Putty. It's not an onerous task: the download is free, the...
Read more >
Fatal Putty Error Fix: Couldn't Agree a Key Exchange Algorithm
Here's a quick fix to the 'Couldn't Agree a Key Exchange Algorithm' Fatal Putty Error you might see when you try to connect...
Read more >
Why I am getting the Key exchange failed. Requested service ...
I am using Rebex for SFTP Connectivity. With the older version of Rebex(2.0.4086.0) sftp connectivity had no issue and worked in one sever....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found