New SFTP plugin available now

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: New SFTP plugin available now

Post by *white »

With clean install I meant clean install of TC. For example unpack the TC installer to a folder, run TC in that folder, install the plugin by double-clicking the zip file, test if the plugin works. If that works, you know that it's a configuration issue.

In the past mixing older and newer versions of libeay32.dll, libssl32.dll, libssh2.dll and zlib1.dll could cause access violation errors. Perhaps you have some of these in your TC folder and still create issues.

When Ghisler responds he can probably tell more, based on this error you get.
spirit21
Junior Member
Junior Member
Posts: 12
Joined: 2022-08-24, 13:43 UTC

Re: New SFTP plugin available now

Post by *spirit21 »

white wrote: 2022-08-24, 22:11 UTC With clean install I meant clean install of TC. For example unpack the TC installer to a folder, run TC in that folder, install the plugin by double-clicking the zip file, test if the plugin works. If that works, you know that it's a configuration issue.

In the past mixing older and newer versions of libeay32.dll, libssl32.dll, libssh2.dll and zlib1.dll could cause access violation errors. Perhaps you have some of these in your TC folder and still create issues.

When Ghisler responds he can probably tell more, based on this error you get.
I unpacked files "tc1051x32_64_rc3.exe"and "INSTALL.CAB", created file wincmd.ini in the INSTALL dir with these strings:

Code: Select all

[Configuration]
UseIniInProgramDir=7
PluginBaseDir=%COMMANDER_PATH%\Plugins
then installed sftp 3.01 plugin with double-clicking and got exception after starting TC and sftp session from NSTALL dir with this message:

Code: Select all

---------------------------
Total Commander 10.51RC3
---------------------------
Exception in sftpplug.wfx:FsFindFirstW!
Access violation at address 60874D0E. Read of address 00000100
Windows 7 SP1 Ultimate 6.1 (Build 7601), base: 00400000

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Windows exception: C0000005
Stack trace:
60874D0E
0044CEDD  0044EEE2  0042A826  0044E3D6  0042A826  00454EAB
0044CEDD  0044E54A  0044EEE2  0042A826  0042FFAE  004300EC
0044E3D6  0042A826  0044E54A  0044EEE2  0042A826  0044E480
0042A826  005D4E58  0044E3D6  0042A826  0044E54A  0044EEE2
0044E54A  0044EEE2  0042A826  0044E480  0042A826  005D4E58
004023FB  004026C4  004185C2  004184EF  004023FB  004026C4
00402255  00418065  00418438  >00450B14  0044CEDD  004023FB
004026C4  0042A7FE  0042A826  0044CEDD  0044EEE2  0042A826
0044E480  0042A826  00402255  004026C4  004026C4  005CBC38
0044CEDD  004023FB  004026C4  004026C4  005DCE83  0044EEE2

Raw:
0044E480  00402EBA  0044CEDD  0044F1B1  0044F1FF  0042C821
0044E54A  0044EEE2  0044EF05  0042A826  0044E3D6  0042A826
0044F25B  0044F618  0043DE27  00454EAB  0044E3D6  00402EBA
0044CEDD  0044F1B1  0044F1B1  0043DBC6  0044E4D2  0044E54A
0044EEE2  0044EF05  0042A826  0042FFAE  004300EC  004065E3
0044E3D6  0042A826  0044F25B  0044CEDD  0044F1B1  0043DBC6
0044E4D2  
Press Ctrl+C to copy this report!
Continue execution?
---------------------------
Да   Нет   
---------------------------
JOUBE
Power Member
Power Member
Posts: 1448
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

ghisler(Author) wrote: 2022-08-24, 13:33 UTC ...the flag for ed25519 was set to "disabled", so it wasn't compiled into the dll. I have now uploaded a fixed version.
Ah, that was the problem...

2ghisler(Author)
Please excuse me for only now replying. I didn't have time to read the forums yesterday, I vesterday used the previous version of the plugin again, which ran fine.


ghisler(Author) wrote: 2022-08-24, 13:33 UTC 2JOUBE
Did you use an ed25519 key?
Yes, I now only use ed25519 keys when possible. Actually always with a passphrase. (and the passphrase, I thought yesterday, is the problem: PUBLICKEY_UNVERIFIED. But no time to test it): To geneate keys I use this:

Code: Select all

ssh-k e y g e n.exe -t ed25519 -P _PASSPHRASE_ -C _COMMENT_ -f _KEYFILE_

ghisler(Author) wrote: 2022-08-24, 13:33 UTC If yes, does the update to 3.01 fix it?
Yes, with the new version 3.01 - provided on the plugin page (SFTP 3.01 2022/08/24) - everything is ok again. The additional information in the log is useful (there could be even more: plugin version, libssh2.dll version, start time, information on the key used (filename))


JO"Thanks and sorry again for no time yesterday to reply"UBE
Last edited by JOUBE on 2022-08-25, 07:41 UTC, edited 1 time in total.
JOUBE
Power Member
Power Member
Posts: 1448
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

spirit21 wrote: 2022-08-24, 23:18 UTC I unpacked files "tc1051x32_64_rc3.exe"and "INSTALL.CAB", created file wincmd.ini in the INSTALL dir with these strings:
Try this (NOT within TotalCommander):
- Rename your original TC-Folder (NOT within TotalCommander)
- run tc1051x32_64_rc3.exe (NOT within TotalCommander, click through)
- created file wincmd.ini in the INSTALL dir with strings: [Configuration], UseIniInProgramDir=7, PluginBaseDir=%COMMANDER_PATH%\Plugin (NOT within TotalCommander)
- start tc
- stop tc
- start tc
- doubleclick the plugin and install it (click through)
- stop tc
- start tc
- run plugin

JO"That works for me."UBE
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: New SFTP plugin available now

Post by *white »

white wrote: 2022-08-24, 16:29 UTC
white wrote: 2022-08-24, 14:51 UTC It seems like when installing the plugin and when using the command cm_UnloadPlugins, libssh2.dll isn't unloaded.
ghisler(Author) wrote: 2022-08-24, 16:17 UTC This is a known problem, unfortunately I don't have a solution.
A mention in the readme.txt perhaps?
Suggestion:
Known issue:
The file libssh2.dll can not be unloaded by Total Commander (either by the cm_UnloadPlugins command or when installing this plugin). If this file is in use and can't be updated, restart Total Commander and install the plugin again.
Last edited by white on 2022-08-25, 09:36 UTC, edited 1 time in total.
Reason: Changed "TC" to "Total Commander"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

2JOUBE
Nice to hear that it works again for you!

2spirit21
Could you send me the name of your server by e-mail to support at ghisler dot com? I do NOT need any login data, the SSH negotiations occur before any login. This way I could try to reproduce your crash. It's possible that there is a yet unknown error in one of the other encryption methods, but I need to know in which one to test it.
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1448
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

ghisler(Author) wrote: 2022-08-25, 09:17 UTC 2JOUBENice to hear that it works again for you!
Yes, nice indeed.

But I have a question about the faulty DLL: With the faulty DLL the fingerprints were changed on all hosts and had to be reconfirmed, even on the hosts without key security but only with password security. That actually has nothing to do with the disabled flag for ed25519, does it? I would be interested in a more detailed technical explanation for reasons of trust.

(Supplement: in version 3.01 the fingerprints are exactly again the same as in the versions before the faulty version 3.0)

JO"sorry"UBE
spirit21
Junior Member
Junior Member
Posts: 12
Joined: 2022-08-24, 13:43 UTC

Re: New SFTP plugin available now

Post by *spirit21 »

ghisler(Author) wrote: 2022-08-25, 09:17 UTC 2JOUBE
Nice to hear that it works again for you!

2spirit21
Could you send me the name of your server by e-mail to support at ghisler dot com? I do NOT need any login data, the SSH negotiations occur before any login. This way I could try to reproduce your crash. It's possible that there is a yet unknown error in one of the other encryption methods, but I need to know in which one to test it.
My server is my home QNAP NAS. Its very likely it is sshd daemon, this is string from top output:

Code: Select all

26549 admin                                S       2452  6378 16.5  0.9 sshd

Code: Select all

[~] # sshd --help   
unknown option -- -
OpenSSH_7.6p1, OpenSSL 1.0.1u  22 Sep 2016
I will send you sshd_config via e-mail.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

Please try these dlls, they seem to work here with your configuration:
https://www.totalcommander.ch/beta/sftpplug302_libssh2.zip
With the faulty DLL the fingerprints were changed on all hosts and had to be reconfirmed, even on the hosts without key security but only with password security.
The fingerprints are those of the server's host key. They change when the host key method changes. The new DLL supports more secure methods which will be preferred over the previously used old methods if the server supports multiple.
The new plugin now shows in the log which method is used, e.g.
Host key method: ssh-ed25519
or
Host key method: rsa-sha2-512

Each method has its own public/private key pair on the server, so when the method changes, the fingerprint of that key is different too.
Author of Total Commander
https://www.ghisler.com
spirit21
Junior Member
Junior Member
Posts: 12
Joined: 2022-08-24, 13:43 UTC

Re: New SFTP plugin available now

Post by *spirit21 »

ghisler(Author) wrote: 2022-08-25, 17:00 UTC Please try these dlls, they seem to work here with your configuration:
https://www.totalcommander.ch/beta/sftpplug302_libssh2.zip
I tried the 64-bit library, placed it in %COMMANDER_PATH%\64\ dir, and sftp session started successfully:

Code: Select all

Loading SSH Library
========================
Connecting to: 192.168.1.3
IP address: 192.168.1.3:22
Key exchange method: diffie-hellman-group-exchange-sha256
Host key method: rsa-sha2-512
Encryption method (both directions): aes128-ctr
MAC (message authentication code) method (both directions): hmac-sha2-256-etm@openssh.com
Server fingerprint:
7F 72 B7 FE 0F 1E 9C 20 25 C9 A5 25 22 C5 65 38
Supported authentication methods: publickey,password,keyboard-interactive
Auth via keyboard interactive for user: admin
libssh2_userauth_keyboard_interactive: PUBLICKEY_UNRECOGNIZED (18)
Authentication via password for user: admin
Session startup (SFTP)
CONNECT \NAS
Get directory: \

Also, it must be noted that the process of starting session was a bit slower then with previous versions of libssh2 (1.8.1_DEV) that I have tested yesterday.

P.S.
32-bit version of the new dll works well too.
JOUBE
Power Member
Power Member
Posts: 1448
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

ghisler(Author) wrote: 2022-08-25, 17:00 UTC Host key method: ssh-ed25519
or
Host key method: rsa-sha2-512
In fact, all the servers I deal with (and there are many, many) can ssh-ed25519. I would not have thought that.

JO"Nice to see that in the log now"UBE
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

Thanks a lot for your tests! I will release a new version 3.0.2 with these dlls soon.
Also, it must be noted that the process of starting session was a bit slower then with previous versions of libssh2 (1.8.1_DEV) that I have tested yesterday.
That's because the new more secure methods like rsa-sha2-512 are a bit slower than the old rsa with sha1 hash.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4594
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: New SFTP plugin available now

Post by *white »

ghisler(Author) wrote: 2022-08-26, 06:50 UTC Thanks a lot for your tests! I will release a new version 3.0.2 with these dlls soon.

Moderator message from: white » 2022-08-28, 14:38 UTC

Since you already released 3.02 on the website and the download in the first post already downloads 3.02, I took the liberty to update first post.

I changed 3.01 to 3.02 and added the line:
- new in 3.02: Fixed crash when using rsa-sha2-512 in some cases
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

The plugin has been updated to version 3.04 final. See first post!

What's new:
Support new key exchange methods curve25519-sha256 and curve25519-sha256@libssh.org
Author of Total Commander
https://www.ghisler.com
hck
Junior Member
Junior Member
Posts: 2
Joined: 2022-11-26, 11:29 UTC

Re: New SFTP plugin available now

Post by *hck »

TC SFTP has some kind of conflict with the latest Openwrt SSH server Dropbear v2022.xx.
It works fine with remote devices (several ms latency).
But it hangs in some situations with local devices (less 1ms latency).

Problem criteria:
1. Local network device with low latency (less 1ms)
2. Modern device with multiple cores
3. Dropbear v2022.xx SSH server

SFTP upload operation of large file (several MB) may freeze TC for about a minute.

Openwrt 22.03.2 running in VirtualBox can be used for problem emulation.

My image is here https://mega.nz/folder/SVdg1YJB#WIlgIJ3iP8iLqBkKOgw_vQ
Server: 192.168.56.2
User: root
Empty password
SCP mode
Post Reply