New SFTP plugin available now

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

Moderators: Stefan2, white, sheep, Hacker

Post Reply
Russ McClay
Junior Member
Junior Member
Posts: 3
Joined: 2003-12-19, 15:14 UTC

Post by *Russ McClay » 2008-08-15, 12:19 UTC

Just to say, thank you Christian!

I've been using Win/Total Commander for ages and I rely
a lot on sftp. For the last few months there are some sites
that were hanging using the old sftp plugin. Those problems
are now gone. =)

Also, I can't believe how fast this new plugin is!! The login
and initial directory display is almost instantaneous.

Thank you for your efforts with Total Commander. It is
my NUMBER ONE application.

Russ McClay
Licence # 145658

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

Post by *ghisler(Author) » 2008-08-15, 16:24 UTC

The third beta is here! Please check the first message.
Problem: When a connection fails, "Verbindung trennen" have to activate two times,
and then goes the Panel back to the last used directory, and not back to the Plugin.
Unfortunately this cannot be avoided at the moment - you have to press disconect for each session, whether it was successful or not.
Suggestion: Could you please add an Icon in the sftpplug.wfx?
OK, I added the small lock icon from the sftp client.
The new way to produce the pub key file solved the problem with key authentication for me.
Nice to hear that!
(1) It would be nice to have a quick way to determine directory and file ownerships (user and group).
Unfortunately I don't currently see a way to get them via SFTP, it only delivery numerical uid and gid values.
(2) Correct display of UTF8 encoded filenames?
OK, added, but cannot test it - please let me know how it works.
(3) Check for empty passphrase on private key?
Added that too!
(4) Ask for username (w/o saving) when left empty?
Currently not possible, maybe in a later version.
(5) Go to home directory when cd'ing to root is forbidden
See above how you can solve this with a button bar button.
Why does libssh2 need a public key to connect?
It seems that it checks whether the server has the correct public key before negotiating with it, but someone would have to study the libssh2 in detail to confirm that.
please change the message box with the password prompt to include the host name.
OK, it shows user@host now, is that OK?
Also, I can't believe how fast this new plugin is!! The login and initial directory display is almost instantaneous.
Indeed the libssh2 on which this plugin is based seems to be very fast. :)
Author of Total Commander
http://www.ghisler.com

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

Post by *ghisler(Author) » 2008-08-15, 16:25 UTC

Here is the list of new feature in version 0.3 beta:

Added: Support UTF-8 encoding of file names (option in connect dialog)
Added: Let user define default permissions of uploaded files and new directories
Added: Use list of supported methods from server to determine connection method
Added: Show user@server in all password dialogs
Added: Do not show configuration dialog to enter password, show separate password dialog
Added: keyboard-interactive login method
Author of Total Commander
http://www.ghisler.com

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

Post by *Mikefield » 2008-08-15, 17:46 UTC

Hello Christian, wow, now, with beta03, it works also with publickey authentication!!!
That was the problem of the newer ACM. What a great work! Thank you very much!

Unfortunately, could it be, that the plugin will not unload when the sessions are disconnected?
It was in the other beta too, I want to copy the sftpplug.wfx from zip in the plugin directory,
but it is not possible until the TC is restarted.
Unfortunately this cannot be avoided at the moment - you have to press disconect for each session, whether it was successful or not.
Yes, but I have only one failed connection, so I thought it's one session, but I have press disconnect two times?
Otherwise, when I have opend two sessions, how can I switch between?

When I close all sessions, it should be, that the panel shows the directory with the connections of the plugin.
Very often I have to connect to two different Server. So when the 1st session is disconnected, it can
quick start the 2nd connection. But very often, not ever, the panel is switched back to the last used directory.

Thanks for the small Icon. :)
See above how you can solve this with a button bar button.
That will be a great Button bar with 40 or more Buttons, each for every Server.

Another point: When I use a home dir in the configuration, after connect, all files in the
home dir will be listet in the little connection window, and they will be also found in the tcftp.log.
When the home dir isn't used, and the dir is changed manual, then the connection window and
the tcftp.log is empty.

Not sure does it happens, but the content of the dir is not stored in the cache, this is active
in the FTP Setup (Inhalt aller besuchten Verzeichnisse merken).


mf
Bankster - Word of the Year 2009

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3375
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp » 2008-08-15, 18:06 UTC

Hello Christian,
Beta3 is fine and the password prompt including user and host is ok.

WinSCP shows Owner names.
Maybe you can get how to do that from its source code.

With this plugin it looks like I can stop to use WinSCP for most of my work
Many thanks for adding it and your support.

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

Post by *ghisler(Author) » 2008-08-15, 18:54 UTC

2Mikefield
You can use the command cm_unloadplugins to unload all plugins. Currently the plugin isn't unloaded when you close a connection.

About disconnect: This is really a problem - normally you need to press Disconnect while the plugin shows the path of the server which you want to disconnect. This way you can be connected to two servers, and disconnect the one which is currently shown. This will also bring you back to the list of servers.

Unfortunately this doesn't work when the connection failed, because then you will never be able to go to a path within that server. The solution would be not to send the "CONNECT \Servername" from the plugin to TC until the connection is made. The downside is that the user cannot see the connection progress then...
When I use a home dir in the configuration, after connect, all files in the home dir will be listet in the little connection window, and they will be also found in the tcftp.log.
Simply turn off detailed logging! Currently the only difference is that detailed logging will also log the complete file listings for debugging purposes.
Author of Total Commander
http://www.ghisler.com

Peter Franz
Junior Member
Junior Member
Posts: 21
Joined: 2003-02-28, 10:45 UTC

Post by *Peter Franz » 2008-08-15, 20:59 UTC

Thank you very much for plugin.
It seems, it is also faster than the old sftp 1.2.58.1
Best Regards
Peter

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

Post by *Mikefield » 2008-08-16, 05:53 UTC

You can use the command cm_unloadplugins to unload all plugins. Currently the plugin isn't unloaded when you close a connection.
OK, I was only wondering about it. Thanks.
The downside is that the user cannot see the connection progress then...
No, connection process is needed! It's easier then to add a button in button bar to launch the plugin again.

Suggestion: If you want to hardcode the plugin, i.e. in 7.5, please have a look to background transfer.
And when you do this, please hardcode the webdav Plugin too, also with background transfer.
Advantage, there is only one ini, the wcx_ftp.ini. :)

PS: Could you please rename the "Quick Connection" to "<Quick Connection>" or so?
In this case it will be in front of the directory and not anywhere within the others.

mf
Bankster - Word of the Year 2009

Sob
Power Member
Power Member
Posts: 908
Joined: 2005-01-19, 17:33 UTC

Post by *Sob » 2008-08-16, 19:35 UTC

Here is my attempt to add IPv6 support:

http://web.hisoftware.cz/sob/download/sftpplug_src03beta-ipv6.patch

User can choose between IPv4, IPv6 and automatic selection. The state of the code is "works fine for me", but since I'm not very good with C, double check by someone more experienced is definitely a good idea.

BashGordon
Junior Member
Junior Member
Posts: 4
Joined: 2008-08-15, 09:13 UTC

Post by *BashGordon » 2008-08-18, 09:06 UTC

(2) Correct display of UTF8 encoded filenames?
OK, added, but cannot test it - please let me know how it works.
(3) Check for empty passphrase on private key?
Added that too!
Works both, wonderful, thank you!
(5) Go to home directory when cd'ing to root is forbidden
See above how you can solve this with a button bar button.
This does not really solve the problem. (1) When connecting to a server for the first time one does not necessarily know the absolute path to the home directory and if access to root path is forbidden login would be impossible. (2) When accessing a server with different accounts I would need separate buttons for each account.
Why does libssh2 need a public key to connect?
It seems that it checks whether the server has the correct public key before negotiating with it, but someone would have to study the libssh2 in detail to confirm that.
No, I do not think so. As far as I remember, the list of authorized public keys must not leave the server. This would be a security hole.

Thanks a lot!
Bash

flo
Junior Member
Junior Member
Posts: 48
Joined: 2007-01-21, 14:57 UTC

Post by *flo » 2008-08-18, 11:53 UTC

Thanks a lot for this plugin! :D

I have been waiting for this tool a lot of time.

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

Post by *ghisler(Author) » 2008-08-18, 16:27 UTC

Here is my attempt to add IPv6 support
Thanks, I have included it now in modified form: I'm loading the IPv6 functions dynamically so the plugin can still be used on older Windows versions. It will be in the next beta.
UTF-8
Works both, wonderful, thank you!
Nice to hear that, thanks for testing!
This does not really solve the problem. (1) When connecting to a server for the first time one does not necessarily know the absolute path to the home directory and if access to root path is forbidden login would be impossible. (2) When accessing a server with different accounts I would need separate buttons for each account.
Unfortunately there is no better solution, sorry. When you use the button command as I suggested, TC will not go to the root.
Author of Total Commander
http://www.ghisler.com

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

Post by *ghisler(Author) » 2008-08-18, 18:15 UTC

The fourth beta is here! Please download it from the first message of this thread.

What's new?
- Ask for user name during connect if none was specified in the configuration
- The public/private key path may now contain environment variables like %commander_path%
- View properties of file/directory under cursor with Alt+Enter
- Support shell commands directly via command line, e.g. chmod, chown etc.
- If a template file sftpplug.tpl exists in the plugin dir, copy it to the ini file if no ini file exists yet
- IPv6 support, code from forum user "Sob", but changed to dynamic loading of ws2_32.dll
- Only show FTP toolbar when connected to avoid problems with disconnect button when connection fails
- Show connect progress in separate dialog
- Show and allow to follow symbolic links to directories
- In the public/private key path, %USER% (all uppercase!) will be replaced by the user name
Author of Total Commander
http://www.ghisler.com

icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu » 2008-08-18, 18:24 UTC

Link in OP still points to Beta 3...

http://ghisler.fileburst.com/beta/sftpplug04beta.zip

Icfu
This account is for sale

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

Post by *ghisler(Author) » 2008-08-18, 19:41 UTC

Fixed it, thanks!
Author of Total Commander
http://www.ghisler.com

Post Reply