SFTP plugin: can't connect to server

English support forum

Moderators: white, Hacker, petermad, Stefan2

Stoneboy
Junior Member
Junior Member
Posts: 3
Joined: 2019-05-11, 06:01 UTC

SFTP plugin: can't connect to server

Post by *Stoneboy »

Hi,

first, thank you very much for Total Commander. I hope that I´ve changed some setting somewhere without realizing it, but since yesterday, I can´t connect to the remote server using the SFTP plugin. When I try using a different program (WinSCP) or on my laptop using the SFTP plugin, it works :(.

The connection isn´t established and is terminated with the error: Unable to exchange ssh keys.

I´ve tried reinstalling the plugin and the entire totalcmd, didn´t solve the issue. I use Windows 10 1903 (recently updated, but it worked on it before it just stopped yesterday morning).

Any help would be appreciated.

Thank you in advance.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SFTP plugin: can't connect to server

Post by *ghisler(Author) »

Sounds like the server side changed encryption algorithms to one not supported by the SFTP plugin. Try updating the plugin. If this doesn't help, you can try the one using OpenSSL dlls from here:
http://www.totalcommander.ch/win/fs/sftpplugxp.zip
and then install the latest OpenSSL dlls from here:
https://www.ghisler.com/openssl
Author of Total Commander
https://www.ghisler.com
Stoneboy
Junior Member
Junior Member
Posts: 3
Joined: 2019-05-11, 06:01 UTC

Re: SFTP plugin: can't connect to server

Post by *Stoneboy »

Thank you VERY much, it works :).
Gab
New Member
New Member
Posts: 1
Joined: 2019-05-24, 07:03 UTC

Re: SFTP plugin: can't connect to server

Post by *Gab »

Hi, I've had this problem, too and updating to the latest plugin and dlls fixed this for me, too. So thanks. :)

I'm very suspicous however, that the problem was caused by the latest Windows 10 1903 update. I am admin of several linux servers and before the update all of them connected without problem. After the update none of them. I experienced this with two Windows client machines.
Arminator
Junior Member
Junior Member
Posts: 7
Joined: 2005-07-28, 10:24 UTC

Re: SFTP plugin: can't connect to server

Post by *Arminator »

I also suspect that the Windows 10 1903 update has to do with it.
I was using Total Commander with the SFTP Plugin fine yesterday, and updated my testing machine in the office to Windows 10 1903.
The regular work machine still on 1809 can connect to the same server fine, but the 1903 machine throws the error: Unable to exchange ssh keys.

I'll try to install the OpenSSL dlls and see if that resolves it as described by the other posters.

EDIT: Can confirm that by installing the XP Plugin and OpenSSL, it works under 1903.
Stoneboy
Junior Member
Junior Member
Posts: 3
Joined: 2019-05-11, 06:01 UTC

Re: SFTP plugin: can't connect to server

Post by *Stoneboy »

I think so too (the problem started after I updated to 1903). The problem is that it worked for a time and then it stopped. If it stopped working right after the update, I could understand it better.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SFTP plugin: can't connect to server

Post by *ghisler(Author) »

Unfortunately it doesn't look good: The problem is a bug in the Windows function BCryptImportKeyPair:
It fails to import an RSA key where the public key exponent is as large as the modulus.
It works with a small 3 byte modulus 65537.

This function is used for the initial key exchange between client and server.
Unfortunately there is almost no chance to get this fixed, there is no way to contact anyone at Microsoft about it.
I will therefore try to find a solution via other functions, e.g. Microsoft Crypto API (although it is marked as deprecated by Microsoft).

So for now, please use the OpenSSL version of the plugin. Sorry for the inconvenience.
Author of Total Commander
https://www.ghisler.com
CoolWater
Power Member
Power Member
Posts: 734
Joined: 2003-03-27, 16:33 UTC

Re: SFTP plugin: can't connect to server

Post by *CoolWater »

sjordi
Junior Member
Junior Member
Posts: 8
Joined: 2009-06-04, 14:05 UTC
Location: Prangins, Switzerland
Contact:

Re: SFTP plugin: can't connect to server

Post by *sjordi »

I confirm it's the Windows 10 1903 update that screws things up.
Did a snapshot of my VM before the upgrade. TotalCMD works like a charm.
Upgraded. Stopped working for sftp.
Saved the entire TotalCMD config/files etc...
Reverted to the snapshot, restore the entire TotalCMD config. Works like a charm.
Upgrade again to Windows 10 1903 update: screwed.
Steve JORDI
Prangins, Switzerland
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SFTP plugin: can't connect to server

Post by *ghisler(Author) »

Have you tried to update the plugin?
Author of Total Commander
https://www.ghisler.com
namiltd
Junior Member
Junior Member
Posts: 10
Joined: 2006-11-02, 08:47 UTC

Re: SFTP plugin: can't connect to server

Post by *namiltd »

Same problem when connecting to web.sourceforge.net
For version 3.03, I get the error: Could not start SSH session, No method negotiated
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SFTP plugin: can't connect to server

Post by *ghisler(Author) »

web.sourceforge.net does not support any key exchange methods supported by libssh2.

web.sourceforge.net supports these:
curve25519-sha256@libssh.org
ecdh-sha2-nistp521
ecdh-sha2-nistp384
ecdh-sha2-nistp256

libssh2 supports these:
diffie-hellman-group1-sha1
diffie-hellman-group14-sha1
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group18-sha512
diffie-hellman-group-exchange-sha1
diffie-hellman-group-exchange-sha256

The ones supported by web.sourceforge.net are not working with the wincng library. They should work with openssl, but I wasn't able to compile the library with openssl due to the mess made by the openssl developers with incompatible versions of the openssl api.
Author of Total Commander
https://www.ghisler.com
namiltd
Junior Member
Junior Member
Posts: 10
Joined: 2006-11-02, 08:47 UTC

Re: SFTP plugin: can't connect to server

Post by *namiltd »

Until the problem is resolved, I am switching to SFTP4TC.
namiltd
Junior Member
Junior Member
Posts: 10
Joined: 2006-11-02, 08:47 UTC

Re: SFTP plugin: can't connect to server

Post by *namiltd »

I found a solution but it only works for the 32 bit version. I used libssh2.dll and libcrypto-3.dll from the package
https://windows.php.net/downloads/qa/php-8.2.0RC5-Win32-vs16-x86.zip
Unfortunately for the 64 bit version, the use of libssh2.dll and libcrypto-3-x64.dll from the analogous file https://windows.php.net/downloads/qa/php-8.2.0RC5-Win32-vs16-x64.zip
I get a message that libssh2.dll is missing
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: SFTP plugin: can't connect to server

Post by *petermad »

2namiltd
Unfortunately for the 64 bit version, the use of libssh2.dll and libcrypto-3-x64.dll from the analogous file https://windows.php.net/downloads/qa/php-8.2.0RC5-Win32-vs16-x64.zip
I get a message that libssh2.dll is missing
Did you put the dlls for the 64 bit version in the subfolder "64" to the plugin's folder?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply