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
mikedepetris
Junior Member
Junior Member
Posts: 84
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: New SFTP plugin available now

Post by *mikedepetris »

maybe a silly question, I access an aws lightsale host and all works after creating pem and pub key files, but I do not have permissions to access most of the files, so I have to use the terminal and give for example:
sudo tar -zcvf tomcat.tar.gz /opt/tomcat/
and then transfer the tomcat.tar.gz file

I there a way to to "sudo" access a file on the fly or "su" since the beginning?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48011
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

Unfortunately not, both would need an interactive way to enter the root password.

Can't you log in with the user account who owns these files?
Author of Total Commander
https://www.ghisler.com
mikedepetris
Junior Member
Junior Member
Posts: 84
Joined: 2006-11-07, 16:36 UTC
Location: Trieste, Italy
Contact:

Re: New SFTP plugin available now

Post by *mikedepetris »

I discovered it's a known problem, you can't login as root to aws machines, you login as a normal user and then sudo or su.
WinSCP and other software allows to spawn another sftp server session running as root, passing "sudo su -c /usr/lib/openssh/sftp-server" as an sftp protocol option for the session.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48011
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

I don't think that this is possible with the library I use (libssh2). The sftp channel is opened via libssh2_sftp_init, which doesn't allow to elevate the session.
Author of Total Commander
https://www.ghisler.com
User avatar
cavalli
New Member
New Member
Posts: 1
Joined: 2021-07-19, 01:32 UTC
Location: Henderson, NV

Re: New SFTP plugin available now

Post by *cavalli »

Any chance of setting up a default remote directory associated with each SFTP site? Starting at "/" in some cases is nowhere near as convenient as a potential default directory. Thanks!
CoolWater
Power Member
Power Member
Posts: 734
Joined: 2003-03-27, 16:33 UTC

Re: New SFTP plugin available now

Post by *CoolWater »

Just add the path to your directory directly after the server, i.e.

myserver.com:22/path/to/my/default/dir
User avatar
blacky
Senior Member
Senior Member
Posts: 311
Joined: 2003-02-07, 16:58 UTC
Location: was das/whot's dath ?

Re: New SFTP plugin available now

Post by *blacky »

Chris, could it be not include a check for slow/fast connection by connect and set a bit for
fast connection over 10MBit and then handling out how the transfer works..
so for slow connection, this handling and for fast this handling of transfear ..
and maybe a small config possibility at when this or this use via pulldown or textfild
maybe becomes the sftp-plugin a couple more byte's but it's more adjustable and have more possibility's

best :)
Meine Blackysgate.de/net
Ma' Personal licence : already one. Hab auch eine
Mein Computer : Einer/once ??? bahh, Rz/Data Centre !
Kitchen, Liv.room, TV, Schlafz.. Sch...
BS/OS: Win3.1/7, Fedora a. other, Reactos
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48011
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

SFTP does not use an adaptive block size, only the internal FTP/FTPS client does.
Author of Total Commander
https://www.ghisler.com
speller2
Junior Member
Junior Member
Posts: 91
Joined: 2009-01-26, 13:49 UTC
Location: Russia

Re: New SFTP plugin available now

Post by *speller2 »

The download link in the first post doesn't work in my Chrome. It works if change proto to https manually.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48011
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

Your Chrome is misconfigured to only open https links. Better browsers automatically change http links to https.
Author of Total Commander
https://www.ghisler.com
pszabo
Junior Member
Junior Member
Posts: 2
Joined: 2020-07-29, 12:27 UTC

Re: New SFTP plugin available now

Post by *pszabo »

Hi Christian!
Is there any chance to have tunnel / port forwarding feature built-in to the SFTP plugin?
I've to connect several servers in paralell via SFTP, but through a "jump" server.
(To achieve this now I've to use WinScp and set a tunnel to the connections.)
To connect the same servers via TC I need to start an external Putty every time, open a dedicated connection in it -where all the remote servers are set up through different tunnels-. And of course in TC I have to set up the connections like: <localhost>:<tunelport1>, <localhost>:<tunelport2>.... (which is annoying to remember that which port forwards to which remote server...)

Is there accidentaly plan to have tunneling in your SFTP plugin?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48011
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

I'm using libssh2, and it does not seem to support tunneling:
https://www.libssh2.org/
Author of Total Commander
https://www.ghisler.com
pszabo
Junior Member
Junior Member
Posts: 2
Joined: 2020-07-29, 12:27 UTC

Re: New SFTP plugin available now

Post by *pszabo »

ghisler(Author) wrote: 2021-10-08, 10:14 UTC I'm using libssh2, and it does not seem to support tunneling:
https://www.libssh2.org/
It might be useful in this case: (As I see it's solving the issue.)
https://github.com/marianafranco/libssh2-tunnel-example/blob/master/libssh2-tunnel-example.c
Do you see any fantasy / possibility in such solution?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48011
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: New SFTP plugin available now

Post by *ghisler(Author) »

Thanks for the link, but this doesn't seem to do what you need:
According to the description, it tells the server to listen on port 4000 (unencrypted) and forward all connections made to the server on this port to the client via the ssh tunnel, port 8080:
Client -> Server: Listens on Port 4040
Once we get a connection:
Client <---(encrypted tunnel)--- Server (port 4040) <--(unencrypted)--- Connection from outside
It seems to do this via function libssh2_channel_forward_listen_ex.

But what you want to do is something else:
Client ---(encrypted tunnel)---> Intermediate server (jump server) ---(encrypted ssh conenction)---> Destination server

So as i understand it, you want to make an encrypted connection to the intermediate server, then open another encrypted connection from there to the destination server. I cannot find any libssh2 functions to achieve this.
Author of Total Commander
https://www.ghisler.com
valexiev
Junior Member
Junior Member
Posts: 28
Joined: 2008-03-31, 09:59 UTC

Re: New SFTP plugin available now

Post by *valexiev »

Hi! I get this error from version 2.80 "Failure requesting identities from ssh-agent!"
I have Pageant running (I use it for WinSCP and Github access).
I start it with c:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\pageant.lnk and I have the same shortcut copied to the plugin folder: c:\totalcmd\plugins\WFX\sftpplug\pageant.lnk
I was able to connect once or twice but can't remember how exactly.

What could be the problem and how can I diagnose it?

Total Commander Version: 9.50 64 bit (2020-02-05). Should I upgrade?
Edited: updated to Version 10.00 64 bit (2021-06-10), same problem.
Post Reply