New SFTP plugin available now

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

I will have a look at it, thanks.
Author of Total Commander
https://www.ghisler.com
George Mpouras
Junior Member
Junior Member
Posts: 9
Joined: 2015-08-27, 14:49 UTC

Re: New SFTP plugin available now

Post by *George Mpouras »

Unfortunately all the files at /proc/ are viewed or copied as blank.
Probably the same is happening for FUSE filesystems
Can you fix it ?
Also is is somehow show, there is a need of some clever caching with some timeout eviction of keys
Thanks G/B
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

George Mpouras wrote: 2025-01-21, 15:42 UTC Unfortunately all the files at /proc/ are viewed or copied as blank.
The files in it are shown as 0 size on the system itself (check this with eg. sudo mc or sudo ls -l ), even if they have content, even if you are root. The only thing that helps is eg. cat filename on the command line (including the Tc one). /proc/ is the special one ;-)
George Mpouras wrote: 2025-01-21, 15:42 UTC Probably the same is happening for FUSE filesystems
This could simply be a user/rights problem (keyword: userspace). Please check this and/or write the exact circumstances here.
George Mpouras wrote: 2025-01-21, 15:42 UTC Also is is somehow show, there is a need of some clever caching with some timeout eviction of keys
Please describe what you mean exactly (in an example?). Thanks
George Mpouras
Junior Member
Junior Member
Posts: 9
Joined: 2015-08-27, 14:49 UTC

Re: New SFTP plugin available now

Post by *George Mpouras »

hello,

For the /proc I would propose that at file view/copy,
if the root folder is starting from /proc/ then to use the output of the
/usr/bin/cat /proc/SomeDir/SomeFile 2> /dev/null

About the slow filesystem browsing.
I have notice, that every time you list a folder, it takes about 100 - 200 ms to appear, no matter if you have visit this folder some seconds before.
So I propose, to keep the nodes in memory on a struct with a timetolive for every record, that it should be re-read from the filesystem at expiration,

I think that is what the WinSCP is doing for being so fast.
Alternative WinSCP gives for free their SDK and they would happy to be used by TC

Thanks
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

George Mpouras wrote: 2025-01-22, 13:23 UTC For the /proc I would propose that at file view/copy,
if the root folder is starting from /proc/ then to use the output of the
/usr/bin/cat /proc/SomeDir/SomeFile 2> /dev/null
This is exact what I mean: put this "/usr/bin/cat /proc/SomeDir/SomeFile" in the TC(!) commandline while the panel is active (the panel with the open SFTP connection). Then you can see the result in the little connection window at top of the Tc (you can double-click on it to open it or use eg. baretail for this)
George Mpouras wrote: 2025-01-22, 13:23 UTC About the slow filesystem browsing.
I have notice, that every time you list a folder, it takes about 100 - 200 ms to appear, no matter if you have visit this folder some seconds before.
So I propose, to keep the nodes in memory on a struct with a timetolive for every record, that it should be re-read from the filesystem at expiration,
IMHO not a good idea, because if you want to see changes in the folder you had to reread it nevertheless.
George Mpouras wrote: 2025-01-22, 13:23 UTC I think that is what the WinSCP is doing for being so fast.
Alternative WinSCP gives for free their SDK and they would happy to be used by TC
First: Do you use the newest beta of the SFTP-Plugin (which is stable over 1 year now)? New Betas are more faster.
Second: It may be possible to develop a separate plugin for Tc based on that API. Maybe someone try it. The truth for me is that I'm not interested.

Joube
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Two suggestions for improving plugin convenience:

- Please add a simple free text field to the properties of each connection so that it is possible to enter notes about the connection directly there. (In other words, a comment field that is saved as a single-line text at the connections section in the ini.) That would be very useful.

- The second request or suggestion is just as useful: Please give each connection an internal ID and use a separate display name for the list in the panel. This means that you can change (rename) the display name without having to change configured user commands (em_... for example for sync configurations). Renaming is sometimes necessary for sorting and for information purposes. If there are a lot of renamings, internal renaming in the inis is cumbersome, time-consuming and error-prone.

Joube
falone
New Member
New Member
Posts: 1
Joined: 2025-03-30, 10:51 UTC

Re: New SFTP plugin available now

Post by *falone »

kirillkolov wrote: 2024-09-29, 11:48 UTC hi.
I have another question. Why for connecting I need to give total commander public and private key? openSSH for example, works with out private key.
Omg, this question saved my day. I was trying to connect for an hour and got no result with 0 errors messages, just did't work. Suddenly it works with public key :D
TimErnon
Junior Member
Junior Member
Posts: 3
Joined: 2025-04-04, 05:41 UTC

Re: New SFTP plugin available now

Post by *TimErnon »

Good morning,

I'm using a Hetzner Storage Box with SCP/SFTP connection. I installed the latest version of this plugin (3.05) but the transfer speed is really low.
Setting up a sftp-connection, Port 22, with no checkbox checked in the settings dialog sets up a connection, but transfer speed is really low (~200kB/sec, I only have a max. of 1.5MB/sec). Bit I can copy all files I want (see below).

Checking the Box "use SCP for transfers" gives about 1.2MB/sec, but I cannot copy files with a space in the filename. E.g. the file 32.pdf works well, but when I try to copy a file '3 2.pdf' (without the quotes) TC gives me an error while uploading message.

Am I doing anything wrong here?

Thanks Tim
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

@TimErnon
Do you use the newest version mentioned here: viewtopic.php?p=454801#p454801 (sftpplug310b5)?

@ghisler(author)
What do you think about to make a release version of it *)?

Joube

*) This pre-release version is stable here for nearly one year now.
TimErnon
Junior Member
Junior Member
Posts: 3
Joined: 2025-04-04, 05:41 UTC

Re: New SFTP plugin available now

Post by *TimErnon »

@Joube: I had the 3.05 version. But the version you linked gives the same results.
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Ok.Try this version with removed check of the Box "use SCP for transfers" (and not checked: use SCP for all) for resolving space problem and higher speed with sftp.

I testet upload now here by uploading many files with spaces (checked: "use SCP for transfers"): no problem with fedora 41

And additional: enable logging for this connection in the connection options *). Disable option compression in the settings of this connection.

And additional: "your-storagebox.de" at port 22 gives back a "SSH-2.0-mod_sftp"? mod_sftp is maybe "hetzner special" ;-) ? Often ssh give back things like this: "SSH-2.0-OpenSSH_,,, N.n" N=9... n=... **) So try ask Hetzner what "mod_sftp" means and what to do. And: IIRC ghisler.com is hosted at hetzner. Maybe ghisler(author) knows a hint.

And additional: Please try port 23 instead of port 22: see this page https://docs.hetzner.com/de/storage/storage-box/access/access-ssh-rsync-borg/

Joube

*) Log file: tcftp.log (please note: no s in the file name!)
**) Where the part "SSH-2.0" is default and nowadays a must for starting communication between client and ssh-server
TimErnon
Junior Member
Junior Member
Posts: 3
Joined: 2025-04-04, 05:41 UTC

Re: New SFTP plugin available now

Post by *TimErnon »

Thanks for your continuos support!

I tried both, port 22 and port 23. With 23 I always got an empty directory only, but the tcftp.log file helped to find out, that something was wrong with the path (path not found...). So I use the following server address now, which logs in correctly: u123456.your-storagebox.de:23/home/

Next I tried to reinstall sftp plugin 3.10B5 but had trouble overwriting a dll file (permissions), so I deleted the old version first and then reinstalled 3.10B5 and see: I get the max. upload speed my connection allows me.

Thanks again for your great help and Christian for the program I use since decades now.

All the best, TE
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

@TimErnon
Very good. Yes, that's exactly how I understood it on the Hetzner info page, that the connection via port 23 only works if you precede it with the user ID. It's good that the user ID (u123456) is so simple in your case. ; - )

@ghisler(author)
Now where the last problem is solved ; - ), what's really stopping you from converting the beta version into a release version? And then continue with new improvements and optimizations after that...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50383
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

Here is the new beta version of the SFTP plugin with the following changes:
1. libssh2 library updated to 1.11.1 with my own additions, supporting crypto methods
aes256-gcm@openssh.com, aes128-gcm@openssh.com and chacha20-poly1305@openssh.com
2. Option to set preferred crypto methods via sftpplug.ini, see readme.txt or below description

https://www.totalcommander.ch/beta/sftpplug310b6.zip
The source code is available here:
https://www.totalcommander.ch/beta/sftpplug_src310b6.zip

Please let me know if you encounter any problems with it.

Setting the preferred crypto methods for a connection:

In file sftpplug.ini, look for name of connection, e.g. [My connection]
Below it, add one or more lines starting with prefmethod. Meaning:
prefmethod0=Key exchange method, e.g. curve25519-sha256
prefmethod1=Host key method, e.g. ecdsa-sha2-nistp256
prefmethod2=Encryption method, client to server, e.g. chacha20-poly1305@openssh.com
prefmethod3=Encryption method, server to client, e.g. chacha20-poly1305@openssh.com
prefmethod4=MAC (authentication), client to server, e.g. hmac-sha2-256-etm@openssh.com
prefmethod5=MAC (authentication), client to server, e.g. hmac-sha2-256-etm@openssh.com
prefmethod6=Compression, client to server, e.g. zlib
prefmethod7=Compression, server to client, e.g. none
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1664
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

beta6:

@ghisler(author)
Every saved connection now displays the message: Warning: The server's fingerprint has changed...

But nothing at the server side have changed.

Is this intentional/necessary? That would be very inconvenient and security-relevant for saved connactions to servers, for example, that are rarely accessed, say only in weeks or even months. How can you then guarantee that it's the correct server without having to verify it? Please revisit.
Post Reply