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.

Error: Handshake failed: no matching key exchange algorithm

See original GitHub issue

Requisites (important to diagnose the problem!)

not working sftp extension.

i’ts my sftp config.

`

"privateKeyPath": null, 
"agent": null,
"passphrase": null,
"interactiveAuth": false,
"protocol": "sftp",
"host": "~~~~~~",
"username": "~~~~",
"password": "~~~~~",
"remotePath": "~~~~~",
"uploadOnSave": true,
"syncMode": "update",
"ignore":[
    ".vscode",
    ".git",
    ".DS_Store"
],
"watcher":{
    "files": "**/*",
    "autoUpload": true,
    "autoDelete": true
},
"algorithms": {
    "kex": [
      "diffie-hellman-group1-sha1",
      "ecdh-sha2-nistp256",
      "ecdh-sha2-nistp384",
      "ecdh-sha2-nistp521",
      "diffie-hellman-group-exchange-sha256",
      "diffie-hellman-group14-sha1"
    ],
    "cipher": [
      "3des-cbc",
      "aes128-ctr",
      "aes192-ctr",
      "aes256-ctr",
      "aes128-gcm",
      "aes128-gcm@openssh.com",
      "aes256-gcm",
      "aes256-gcm@openssh.com"
    ],
    "serverHostKey": [
      "ssh-rsa",
      "ecdsa-sha2-nistp256",
      "ecdsa-sha2-nistp384",
      "ecdsa-sha2-nistp521"
    ],
    "hmac": [
      "hmac-sha2-256",
      "hmac-sha2-512",
      "hmac-sha1"
    ]
}

`

Extension Logs

`

at check_KEXINIT (/Users/keen/.vscode/extensions/liximomo.sftp-1.0.5/node_modules/ssh2-streams/lib/ssh.js:2279:15) at check (/Users/keen/.vscode/extensions/liximomo.sftp-1.0.5/node_modules/ssh2-streams/lib/ssh.js:2217:9) at onKEXINIT (/Users/keen/.vscode/extensions/liximomo.sftp-1.0.5/node_modules/ssh2-streams/lib/ssh.js:2214:5) at SSH2Stream.<anonymous> (/Users/keen/.vscode/extensions/liximomo.sftp-1.0.5/node_modules/ssh2-streams/lib/ssh.js:206:5) at emitTwo (events.js:106:13) at SSH2Stream.emit (events.js:194:7) at parse_KEXINIT (/Users/keen/.vscode/extensions/liximomo.sftp-1.0.5/node_modules/ssh2-streams/lib/ssh.js:4105:8) at parsePacket (/Users/keen/.vscode/extensions/liximomo.sftp-1.0.5/node_modules/ssh2-streams/lib/ssh.js:4001:12) at SSH2Stream._transform (/Users/keen/.vscode/extensions/liximomo.sftp-1.0.5/node_modules/ssh2-streams/lib/ssh.js:667:13) at SSH2Stream.Transform._read (_stream_transform.js:167:10) at SSH2Stream._read (/Users/keen/.vscode/extensions/liximomo.sftp-1.0.5/node_modules/ssh2-streams/lib/ssh.js:251:15) at SSH2Stream.Transform._write (_stream_transform.js:155:12) at doWrite (_stream_writable.js:329:12) at writeOrBuffer (_stream_writable.js:315:5)`

Specifications

  • Version: 1.0.5
  • Platform: High Sierra 10.13.1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
liximomocommented, Mar 13, 2018

Try v1.1.0. It should be fixed.

1reaction
liximomocommented, Mar 9, 2018

What is the valid kex algorithm for your server? If you don’t know, you can set all kex algorithms.

{
 "kex": [
      "ecdh-sha2-nistp256",
      "ecdh-sha2-nistp384",
      "ecdh-sha2-nistp521",
      "diffie-hellman-group-exchange-sha256",
      "diffie-hellman-group14-sha1",
      "diffie-hellman-group-exchange-sha1",
      "diffie-hellman-group1-sha1"
 ]
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Re: Onboarding Error - No matching Key Exchange algorithm
Can you SSH to the switch directly from the laptop you are running the onboarding app? The message indicates there is no matching...
Read more >
Error: Handshake failed: no matching key exchange algorithm ...
It seems it's an issue with the ssh2 package. The options object is forwarded to ssh2 methods, which means you can set all...
Read more >
ssh2 node js sftp protocol Error Handshake failed
Handshake : No matching key exchange algorithm. Based on this error I updated my config's algorithm: { "port": 22, "host": "test.test.com", ...
Read more >
connect->getConnection: Handshake failed: no matching key ...
Hi,. I'm getting error when try to connect a SFTP. connect->getConnection: Handshake failed: no matching key exchange algorithm.
Read more >
handshake failed: ssh: no common algorithm for key exchange
Issue. The SSH Key Exchange and Ciphers for the switch are older than expected and do not allow for SbPAM to connect with...
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