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
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

I already tried to add support for Putty's Pageant. Unfortunately it seems, that the only way to pass the keys to libssh2, is to let it read them from pem file. I can imagine getting the keys from Pageant/.ppk file and saving them into temporary file in pem format for libssh2, it would work, but it would definitely ruin the plugin's security rating. ;)
I'll be very happy if someone proves me wrong, showing that there's a secure way to do that.
CoolWater
Power Member
Power Member
Posts: 744
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

Sob wrote:In fact, it needs something even better. What if user creates file "stat: not found"? :) Colon character is no problem for Unix filesystem..

And how exactly does the line with time-only date field look like?

Edit: instead of "not found", return value can be checked. My bash@linux return 127 when command is not found, but is it the same everywhere? For example aso's ksh@solaris? I've never seen such thing. :)
On Debian, the return value is 127, too.

IIRC correctly, only HH:MM occured in the time-only date field. But i cannot find such a case anymore :( On the latest Debian, ls -al returns something like this:

Code: Select all

-rw-r--r-- 1 root      root    269K 2008-10-08 11:59 filename.ext
HTH
CW
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50830
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please add support for putty .ppk files. Shouldn't be too hard to extract private/public key from them..
I tried a way to do that, but unfortunately it's not possible with the OpenSSH functions - they use a completely different encryption of the private key.
Author of Total Commander
https://www.ghisler.com
andres992
Member
Member
Posts: 124
Joined: 2006-04-12, 21:26 UTC

Post by *andres992 »

After quite continuous usage I have noticed one problem.

My router tends to not keep SFTP connections up very long for some reason. This means that at some point in time (maybe in 1 or 2 hours of inactivity), the connection is closed by the router and I would have to log in again. This is totally the fault of the router but I do not know how to solve the router problem (and I do not care as the login is quite easy with TC 7).

In such cases, when I return to the TC window, Total Commander seems to freeze for a very long time, which is a bit of an annoyance.

Is it possible to detect such situations and avoid the freezing of TC?
#68776 Personal Licence
User avatar
Mikefield
Power Member
Power Member
Posts: 628
Joined: 2006-02-26, 19:13 UTC
Location: Oberursel, Germany HE

Post by *Mikefield »

andres992 wrote:In such cases, when I return to the TC window, Total Commander seems to freeze for a very long time, which is a bit of an annoyance.

Is it possible to detect such situations and avoid the freezing of TC?
This is a known problem. It's discussed here on page 7 and 8 in this thread.
Please have a look where Christian announces beta 8.
There is a timeout in the SFT library dll of 20 seconds.
Here, it needs 37 seconds before it work again or the TC crashs. :(

mf
Bankster - Word of the Year 2009
ommadawn
New Member
New Member
Posts: 1
Joined: 2009-01-20, 15:23 UTC

Post by *ommadawn »

3rd: The sftpplug.ini file is stored in the main directory of TC, I prefer the plugin directory
The ini is stored in the directory which you set for wincmd.ini.


Dear Christian!

The place of sftpplug.ini file would be useful in plugin directory so as man could be able to create many "Secure FTP" folders in "My Network Places" (with different names) to manage sftp connections if he/she have lots of them.

Can I hope it in the next version?

Thanx
gwwurth
Junior Member
Junior Member
Posts: 63
Joined: 2004-12-01, 15:47 UTC
Location: D-63263 Neu-Isenburg

Post by *gwwurth »

Is there any idea about so called "exotic server" as found in TC ftp Details?
This is because we use z/OS(MVS) filesystems as well as OMVS(USS) filesystems = Unix type which do work.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50830
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The SFTP plugin does NOT parse the directory contents itself. It requests the details via a special SFTP command, which returns the file details directly. Therefore my plugin has no influence on the file list parsing. To my knowledge, the information has to be sent by the server in the correct form.

What exactly doesn't work with your server?
Author of Total Commander
https://www.ghisler.com
gwwurth
Junior Member
Junior Member
Posts: 63
Joined: 2004-12-01, 15:47 UTC
Location: D-63263 Neu-Isenburg

Post by *gwwurth »

Using normal FTP when opening a z/OS server I am routed to a MVS filesystem or a HFS filesystem depending on what remote target is pointed to. Say: no explizit remote target or maybe like 'USER.DATA' will be routed to the MVS filesystem, wheras a remote target like /tmp will be routed to the HFS file. Changing directory then will act accordingly.

Now I start the SFTP plugin which uses port 22 I think.
There I am routed to the HFS filesystem similar to mentioned above but to the root directory, not my home. I can navigate through the trees.
I am not rooted to the MVS filesystem nor can I point to it by Change directory.

Maybe there might be dependencies concerning the FTP-Server task?
Gerhard
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7009
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

gwwurth wrote:Using normal FTP when opening a z/OS server I am routed to a MVS filesystem or a HFS filesystem depending on what remote target is pointed to. Say: no explizit remote target or maybe like 'USER.DATA' will be routed to the MVS filesystem, wheras a remote target like /tmp will be routed to the HFS file. Changing directory then will act accordingly.

Now I start the SFTP plugin which uses port 22 I think.
There I am routed to the HFS filesystem similar to mentioned above but to the root directory, not my home. I can navigate through the trees.
I am not rooted to the MVS filesystem nor can I point to it by Change directory.

Maybe there might be dependencies concerning the FTP-Server task?
Gerhard
There is nothing an sFTP client can do to overcome that problem.
You have to ask the gurus of your zOS about possible syntax for change dir. Its for example the problem with Cygwin servers you have to know that the path starts with /cygdrive/ to change trees.
May be your host has similar construct.
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

I just made the first step to support PuTTY's Pageant. :)

In fact, it already works for me here. Here's the patch for sftpplug:

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

But there's a catch. It will only be useful when/if another patch makes it into official release of libssh2:

http://sourceforge.net/tracker/index.php?func=detail&aid=2015856&group_id=125852&atid=703944

Until then, you can have fun only if you're developer and can compile it yourself.
cry0
Junior Member
Junior Member
Posts: 3
Joined: 2009-01-25, 21:11 UTC

Post by *cry0 »

I'm currently using WinSCP for my SFTP transfer needs, also for editing files, as I'm not a fan of vi. I would happily change to TC, but I would miss the following:

when I open some file for editing in WinSCP and then save it (in editor) - the file instantly gets transferred to the server. In TC case I have first to save changes in editor, close the editor, go back to TC to see the dialog whether I want to upload changed file and then confirm.
It seems like WinSCP tracks the opened tmp file for changes.

I have a lot to do with web-applications, editing them on remote servers, so that opening-closing-confirming is quite uncomfortable. So it would be great, if TC had that neat feature (maybe also for FTP)
cry0
Junior Member
Junior Member
Posts: 3
Joined: 2009-01-25, 21:11 UTC

Post by *cry0 »

oh and I've found a bug:

I have misstyped the hostname of the server I wanted to connect to, saved it as the new connection. Double-clicked on it, then TC started to do weird indefinite loops, trying to connect (trying to do this in quick connection makes TC hang). I have to make a remark here: the hostname I mistyped, exists and gets resolved, but isn't connectable through SSH. Then i tested with some non-existent hostname, like 'nonexistenthost.domain' - this time I got an error message like "can't resolve the hostname". Which looks reasonable.

I spent like 20 mins on searching for problems outside of TC, so I guess it would be good, if plugin could check if it can connect to port 22 with a timeout of, say, 5 seconds, and then report to the user with some informative error message.
ThiefMaster
Junior Member
Junior Member
Posts: 79
Joined: 2003-10-27, 16:49 UTC
Contact:

Post by *ThiefMaster »

Would it be possible to get Drive[0-9] icons for SFTP connections? That'd be extremely useful.
TC-Fan-forever
New Member
New Member
Posts: 1
Joined: 2009-02-10, 18:05 UTC

Re: New SFTP plugin available now

Post by *TC-Fan-forever »

ghisler(Author) wrote:Because of the stopped development of the old SFTP plugin I have written a new one now ...
Awesome. Great job indeed!! Works fine. javascript:emoticon(':D')

One little thing: perhaps it will be possible to enable configuration of local and remote directory which is also available in standard ftp configuration.
Post Reply