Skip to content
Advertisement

ssh2 node js sftp protocol Error Handshake failed

Hello i have a little problem, i developped a script sftp client with node js that connect to an sftp server and grab some files, i tested it with my local server its working, but when i tried to use it with production server i received this error :

Error: Handshake failed: no matching key exchange algorithm

i already generated the rsa key using ssh-keygen

here is the relevant part of the script :

JavaScript

Advertisement

Answer

I also had the same problem and solved it by adding the following:

JavaScript
Advertisement