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
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

As I understand it, the client has to do some extra work to handle port forwarding with SFTP. Other users have requested that I support that, but so far I haven't figured out how it can be done with OpenSSH, sorry.
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

What alinmesser needs sounds more like accessing SSH on different port. Something that's done using e.g.:

Code: Select all

iptables -t nat -A PREROUTING -j DNAT -p tcp -d <ip address> --dport <some port> --to <other address>:<other port>
But it must work, I use the same setup for a long time.
alinmesser
Junior Member
Junior Member
Posts: 4
Joined: 2010-03-09, 00:33 UTC

Post by *alinmesser »

sob: I have that, and putty is working, as I already mentioned.
[face=courier]Chain PREROUTING (policy ACCEPT 45M packets, 5427M bytes)
pkts bytes target prot opt in out source destination
86 4424 DNAT tcp -- !eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:2200 to:*.*.*.2:22[/face]

ghisler: I will look into how the SFTP procotol works, I hope it's not like FTP, where a separate data connection is initiated.
EDIT: I will try to make it work with psftp first, I can see that one doesn't work either.
kbonner
Junior Member
Junior Member
Posts: 2
Joined: 2010-03-12, 18:24 UTC

plugin cant find curl dll's

Post by *kbonner »

The files on the site listed in the README (win32 - Generic v7.20) don't have the libssh2.dll in them. Is there somewhere else?
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3869
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

2kbonner: Sure it has libssh2.dll !
You just have to download the file titled with "libcurl" ...
#5767 Personal license
kbonner
Junior Member
Junior Member
Posts: 2
Joined: 2010-03-12, 18:24 UTC

Post by *kbonner »

Thanks,

I was looking in the binary packages.
alinmesser
Junior Member
Junior Member
Posts: 4
Joined: 2010-03-09, 00:33 UTC

SFTP through port forwarding problem solved

Post by *alinmesser »

ghisler(Author) wrote:As I understand it, the client has to do some extra work to handle port forwarding with SFTP. Other users have requested that I support that, but so far I haven't figured out how it can be done with OpenSSH, sorry.
Hi Christian,

I just wanted to let you know I solved the problem of SFTP connecting through port forwarding. The issue is SFTP getting confused if there's any output from .bashrc|.profile etc.
http://autosys.us/misc/sftp_received_message_too_long.html
For the life of me, I don't see why that confuses the SFTP client but only when the connection is port forwarded...

In my case it was just a matter of adding:
[face=courier]if [ "$TERM" != "dumb" ]; then fortune; fi[/face]
for fortune ;)

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

Post by *ghisler(Author) »

Ah, thanks for the info, that will certainly help other users too! Apparently this is causing problems to the OpenSSH library used by TC...
Author of Total Commander
https://www.ghisler.com
alinmesser
Junior Member
Junior Member
Posts: 4
Joined: 2010-03-09, 00:33 UTC

More details

Post by *alinmesser »

ghisler(Author) wrote:Ah, thanks for the info, that will certainly help other users too! Apparently this is causing problems to the OpenSSH library used by TC...
Actually, it also applies to PuTTY (psftp), this is what I troubleshooted with and once it worked, it worked in TC as well.

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

Post by *Sob »

Recent version of libssh2 (1.2.3 to be precise) added support for ssh agent authentication that works with PuTTY's Pageant. This version of library is already included in cURL binary packages.

So here's the patch for sftpplug to allow the use of this nice feature:

http://web.hisoftware.cz/sob/download/sftpplug_src094beta-agent.patch

In addition, new libssh2 headers are required (they are not included in above patch to keep it simple). Here is handy converter for those from distribution for use with sftpplug sources:

http://web.hisoftware.cz/sob/download/convert-libssh2-headers.js

If this patch is included (I hope so :), then connection settings window could probably use a little redesign, to allow more detailed selection of authentication methods. Which ones to use, their order, etc...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Nice addition, thanks very much! I will include it in my plugin as soon as possible (after testing it, of course).
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have added Pageant support now! You will get an error if your OpenSSH dll is too old and you try to use the Pageant authentication, but other methods will still work.

Also downloads via SCP will work again now, just make sure to use the latest OpenSSH dlls.

You can download the new version 0.97 from the first post of this thread.

Please report any bugs in this thread!
Author of Total Commander
https://www.ghisler.com
charly_35
Junior Member
Junior Member
Posts: 21
Joined: 2010-03-26, 17:14 UTC
Location: France Rennes 35

Post by *charly_35 »

I use this SFTP plugin for transfering files but I don't find any option to always set the transfert in background like the internal FTP. May I miss something ? thks
Cdlt Charles.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Currently you cannot make this the default, sorry.
Author of Total Commander
https://www.ghisler.com
Bjorn2
Junior Member
Junior Member
Posts: 4
Joined: 2010-03-30, 14:07 UTC

Post by *Bjorn2 »

I'm having trouble getting SFTP to work. I use v7.50a and Windows 7 x64. Has anyone got this to work? It works fine with Winscp so the login credentials are ok. Nothing happens when trying to connect. I really want this to work so I can ditch winscp.
Post Reply