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, sheep, Hacker, Stefan2

Post Reply
mikedepetris
Junior Member
Junior Member
Posts: 80
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: 41541
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
http://www.ghisler.com
mikedepetris
Junior Member
Junior Member
Posts: 80
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: 41541
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
http://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: 693
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
Post Reply