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
sgp
Senior Member
Senior Member
Posts: 355
Joined: 2005-01-31, 16:04 UTC

Post by *sgp »

Does the plugin support direct sftp-to-sftp copy? I tried left=remote1 to right=remote2 and I got an exact replica of folder structure but no files inside. Both remotes are WinXP Pro SP3.
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

@sgp, it was just requested by TWatcher, see page 5 in this thread. Here the answer from Christian:
ghisler(Author) wrote:No, sorry - the plugin would have to download the file and then re-upload it, which would be very inefficient and slow. Beta 0.6 now supports to copy files within a server, though, by sending the "cp" command directly as a shell command.
mf
Bankster - Word of the Year 2009
Peter van Heun
Junior Member
Junior Member
Posts: 3
Joined: 2008-09-30, 11:48 UTC

sftp slow?

Post by *Peter van Heun »

First of all: GREAT, thx. I've waited a long time for sftp. I used the old one but this one looks better.

But I'm always looking for improvement. sftp is clearly slower than ftp of ftps. Is improvement in sftp speed possible?
CoolWater
Power Member
Power Member
Posts: 739
Joined: 2003-03-27, 16:33 UTC

Re: sftp slow?

Post by *CoolWater »

Peter van Heun wrote:First of all: GREAT, thx. I've waited a long time for sftp. I used the old one but this one looks better.

But I'm always looking for improvement. sftp is clearly slower than ftp of ftps. Is improvement in sftp speed possible?
I don't think there is much more speed possible. If you have used the old sftp plugins, you will have noticed that the current solution is much more faster than the old ones.

Regards,
CoolWater
TWatcher
Junior Member
Junior Member
Posts: 43
Joined: 2008-08-26, 18:46 UTC

Post by *TWatcher »

I updated my AHK script to launch a putty session out of an active sftp-plugin connection, now also supporting an automatic login if password is stored. I opened a new thread, for details see here: [AHK] launch putty session out of sftp-plugin connection.
TWatcher
Peter van Heun
Junior Member
Junior Member
Posts: 3
Joined: 2008-09-30, 11:48 UTC

Re: sftp slow?

Post by *Peter van Heun »

CoolWater wrote:
Peter van Heun wrote:First of all: GREAT, thx. I've waited a long time for sftp. I used the old one but this one looks better.

But I'm always looking for improvement. sftp is clearly slower than ftp of ftps. Is improvement in sftp speed possible?
I don't think there is much more speed possible. If you have used the old sftp plugins, you will have noticed that the current solution is much more faster than the old ones.

Regards,
CoolWater
HHmmm.

With this new plugin I reach a speed of about 50 kbps when sending a pdf. When sending the pdf with Putty through a ftp tunnel in the Commander, the speed gets up to about 70 kbps....
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Maybe it helps to disable ZLIB compression?
Author of Total Commander
https://www.ghisler.com
Peter van Heun
Junior Member
Junior Member
Posts: 3
Joined: 2008-09-30, 11:48 UTC

Post by *Peter van Heun »

ghisler(Author) wrote:Maybe it helps to disable ZLIB compression?
I did not use zlib. When I try to use zlib I get an sftp error window.

"Error: Could not start ssh session: Unable to exchange ecryption keys."
mag
Junior Member
Junior Member
Posts: 35
Joined: 2008-10-06, 08:35 UTC

Speed

Post by *mag »

Hello,

regarding the transfer speed I've done a quick test on 100Mbps LAN comparing the old plugin (1.2.58.1) and this new one (beta 8) with the following results:

Upload:
Old 4300kBps, CPU usage 35%
New 315kBps, CPU usage 50%

Download:
Old 315kBps, CPU usage 4%
New 630-790kBps, CPU usage 4%

- tested on transfer of 80MB large file
- tested on notebook with Intel dual core CPU (2GHz) so 50% CPU usage means 100% usage of one core
- in both cases the compression was disabled
- these are average values from approx. 5 tests performed for each operation, the results were pretty much the same during each iteration, only once I got faster download speed with the new plugin rating at approx. 790kbyte/s while all other tests shown speed at 630kbyte/s.
JOUBE
Power Member
Power Member
Posts: 1507
Joined: 2004-07-08, 08:58 UTC

Post by *JOUBE »

Thank you for this very important plugin.

Please add SCP support to it.

SCP is the old-fashioned ssh file handling protocol. Some small hardware devices, which supports ssh based on (for example) the Dropbear daemon, supports only this old SCP protocol and not the newer SFTP protocol.

I take a look in your sources of the plugin (Many thanks for the sources!). At a first look it seems not very difficult:

In the header file "sftpfunc.h" the

Code: Select all

BOOL usescp;
is already part of struct "ConnectSettings".

In the file "sftpfunc.cpp" in LoadServerSettings (line 919 ff)

Code: Select all

	ConnectResults->usescp=GetPrivateProfileInt(gDisplayName,"scp",0,gIniFileName)!=0;
(or so) is needed (... and a corresponding checkbox in the mask (but this is not important)).

I thinks that's all, folk... (because in Sftpconnect (line 271 ff of file "sftpfunc.cpp") the settings for libssh2_sftp_init is already done then. Am I right with this?

Thank you for your support.

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

Post by *ghisler(Author) »

Unfortunately it's not that easy. Uploading and downloading would be quite easy to add, I would just call libssh2_scp_send_ex and libssh2_scp_recv. However, there is no function for reading the directory listing. I would probably need to open a shell session, and then send the ls -a command and parse it manually...
BOOL usescp;
is already part of struct "ConnectSettings".
That's just for preparing scp support, but I haven't had the time yet to write the actual code for all the SCP functions...
Author of Total Commander
https://www.ghisler.com
Snaker01
Junior Member
Junior Member
Posts: 2
Joined: 2006-01-31, 10:49 UTC

Post by *Snaker01 »

Hello,

I have some questions.

1) Where can I say TC that I want to use SFTP?
2) Which port use the FTP via SSH?
3) Ist FTP via SSH the same wie an SSH Connection over port 22?

Thanks.

Snaker01
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

Hello Snake, SFTP is independend from the FTP Menu. SFTPplug is a filesystem plugin,
you can start it over the Network neighborhood within the TotalCommander.
In the properties of the connection you can setup the port, normaly it's Server:Port/dir
Not really shure if it is the same, but you can also send some commands to the server
in the command line of the Total Commander.

mf
Bankster - Word of the Year 2009
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, my plugin uses the standard SFTP port 22 if no port is specified.
Author of Total Commander
https://www.ghisler.com
andres992
Member
Member
Posts: 124
Joined: 2006-04-12, 21:26 UTC

Post by *andres992 »

For some strange reason I discovered that although the file rights problem was fixed, I am still getting chmod 755 on making a new folder while in preferences I have specified 777. Any ideas?
#68776 Personal Licence
Post Reply