New SFTP plugin available now
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
What alinmesser needs sounds more like accessing SSH on different port. Something that's done using e.g.:
But it must work, I use the same setup for a long time.
Code: Select all
iptables -t nat -A PREROUTING -j DNAT -p tcp -d <ip address> --dport <some port> --to <other address>:<other port>
-
- Junior Member
- Posts: 4
- Joined: 2010-03-09, 00:33 UTC
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.
[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.
plugin cant find curl dll's
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?
- sqa_wizard
- Power Member
- Posts: 3893
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
-
- Junior Member
- Posts: 4
- Joined: 2010-03-09, 00:33 UTC
SFTP through port forwarding problem solved
Hi Christian,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.
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
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
-
- Junior Member
- Posts: 4
- Joined: 2010-03-09, 00:33 UTC
More details
Actually, it also applies to PuTTY (psftp), this is what I troubleshooted with and once it worked, it worked in TC as well.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...
Alin
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...
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...
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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!
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
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Currently you cannot make this the default, sorry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com