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
CoolWater
Power Member
Power Member
Posts: 739
Joined: 2003-03-27, 16:33 UTC

Re: New SFTP plugin available now

Post by *CoolWater »

Well, that's exactly what JOUBE requested: "User and Group has to be added to the full view within the sftp plugin by the sftp plugin itself."

For me, it is clear that this is only possible via custom columns.

The plugin has no influence on the displayed columns, unless custom column support is implemented. That's what I meant. To clarify that columns columns are needed to show user/group info.

I already implemented custom column support. As soon as I am done with it, I will send it to Christian.

CoolWater
User avatar
Dalai
Power Member
Power Member
Posts: 9461
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: New SFTP plugin available now

Post by *Dalai »

Well, a custom columns view can mimic Full view by adding all columns from that view and add additional columns at the same time. One could call that "user and group [...] added to Full view" since there's very little difference.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
JOUBE
Power Member
Power Member
Posts: 1507
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

2Dalai
The scp variant has one advantage. You can decide how to retrieve the file listing via 'ls'. In this case, by adding the -F option *), one can determine what kind of target a symlink is. And then display this in the symlink's icon within the panel within the Tc. As it is a file or a directory. This was requested and suggested by a user.

So could you please create a log (and post it here) for the Fli4l system with the following command in the TC command line within the sftp plugin:

Code: Select all

ls -laF
This is to check wether the -F option works there or not. Depending on the type, an asterisk or a slash and others are then added to the filename.

Thanks.

Joube

*) append indicator (one of */=>@|) to entries
User avatar
Dalai
Power Member
Power Member
Posts: 9461
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: New SFTP plugin available now

Post by *Dalai »

This Busybox's ls command doesn't support -F. Here's the usage information from it:

Code: Select all

BusyBox v1.22.1 (fli4l) multi-call binary.

Usage: ls [-1AaCxdlinsehrSXvctu] [-w WIDTH] [FILE]...

List directory contents

        -1      One column output
        -a      Include entries which start with .
        -A      Like -a, but exclude . and ..
        -C      List by columns
        -x      List by lines
        -d      List directory entries instead of contents
        -l      Long listing format
        -i      List inode numbers
        -n      List numeric UIDs and GIDs instead of names
        -s      List allocated blocks
        -e      List full date and time
        -h      List sizes in human readable format (1K 243M 2G)
        -r      Sort in reverse order
        -S      Sort by size
        -X      Sort by extension
        -v      Sort by version
        -c      With -l: sort by ctime
        -t      With -l: sort by mtime
        -u      With -l: sort by atime
        -w N    Assume the terminal is N columns wide
        --color[={always,never,auto}]   Control coloring
Note that I've changed the Busybox's config (and recompiled it) a couple of years ago because its ls command doesn't even support colored output by default. It's possible that the same could be done for the -F switch if CONFIG_FEATURE_LS_FILETYPES is the corresponding option for that. Still, it's not available by default, and it's likely that other embedded systems have the same limitation.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
JOUBE
Power Member
Power Member
Posts: 1507
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Ok, thanks very much.

But I do not understand what really happens if you send ls -laF:

- is the option -F silently ignored and the list is shown like it is shown without option -F *)?
- gives it the answer about the usage as you show it above and exit without sending the list?
- or is it like this: it shows the list after a short hint about the usage/the unknown option.

Because -F gives only an additional information, which is not really needed, all execpt "exit without sending the list" will be okay.

Joube

*) like it is in your previous log with the option "--time-style"?
User avatar
Dalai
Power Member
Power Member
Posts: 9461
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: New SFTP plugin available now

Post by *Dalai »

Unknown switches result in an error message ("invalid option -- <switch>") and the usage information shown, without list output in such cases. Regarding the --time-style switch, I guess that the plugin tries it, realizes that it didn't get any output and tries again without this switch.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
JOUBE
Power Member
Power Member
Posts: 1507
Joined: 2004-07-08, 08:58 UTC

Re: New SFTP plugin available now

Post by *JOUBE »

Thanks.
Dalai wrote: 2023-08-05, 12:17 UTC Regarding the --time-style switch, I guess that the plugin tries it, realizes that it didn't get any output and tries again without this switch.
Ah, that explains that part of the log:

Code: Select all

ls -la --time-style="+>>%Y%m%d_%H%M%S" /
ls
export LC_ALL=C
ls -la /
Dalai wrote: 2023-08-05, 12:17 UTC Unknown switches result in an error message ("invalid option -- <switch>") and the usage information shown, without list output in such cases.
Then of course 'ls -laF' would also work in principle with the following restart with: 'ls -la'.

But maybe it is better to answer this specific question to the listing via the option -F on the Tc commandline and to keep the plugin free from it.

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

Re: New SFTP plugin available now

Post by *ghisler(Author) »

A new beta version is available now:
https://www.totalcommander.ch/beta/sftpplug310b1.zip
Sources:
https://www.totalcommander.ch/beta/sftpplug_src310b1.zip

What's new?
Forum user CoolWater has developed code to show user, group and permissions as custom columns. Many thanks to him!

Please try it!
Author of Total Commander
https://www.ghisler.com
Pawel
Junior Member
Junior Member
Posts: 88
Joined: 2018-12-18, 11:54 UTC
Location: Poland
Contact:

Re: New SFTP plugin available now

Post by *Pawel »

2ghisler(Author)
Great news!
Could you please show how to use the plugin?
I can not connect to my website (progressbar stuck on 90% and back to 80%, in loop)...
In log: Error: Could not initialize SFTP session!

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

Re: New SFTP plugin available now

Post by *ghisler(Author) »

This means that your sever is an SSH server but is missing the SFTP subsystem.
Open the properties of the connection with Alt+Enter on the connection name, and check the option to use SCP for everything.
Author of Total Commander
https://www.ghisler.com
Pawel
Junior Member
Junior Member
Posts: 88
Joined: 2018-12-18, 11:54 UTC
Location: Poland
Contact:

Re: New SFTP plugin available now

Post by *Pawel »

Thanks,
I still can not connect. TC hangs.
https://ibb.co/JtzGyhF

LOG:
Connecting to: hhhhhhhhhh
IP address: ZZZZ:22
Key exchange method: curve25519-sha256
Host key method: ssh-ed25519
Encryption method (both directions): aes128-ctr
MAC (message authentication code) method (both directions): hmac-sha2-256-etm@openssh.com
Server fingerprint: YYYYYYYY
Supported authentication methods: publickey,gssapi-keyex,gssapi-with-mic,password
Authentication via password for user: XXXXX


What could it be?
CoolWater
Power Member
Power Member
Posts: 739
Joined: 2003-03-27, 16:33 UTC

Re: New SFTP plugin available now

Post by *CoolWater »

Why not use auto detect for system and codepage?

Does it work with WinSCP?

Please login with putty or so and exec the following command:
file `which scp`

What does it return?

Also please post the sftpplug.ini setting for largefilesupport.
Pawel
Junior Member
Junior Member
Posts: 88
Joined: 2018-12-18, 11:54 UTC
Location: Poland
Contact:

Re: New SFTP plugin available now

Post by *Pawel »

Autodetection changes nothing.
I will try WinSCP, will get you know.

If it NOT work with WinSCP, I will contact with my hosting provider.

Putty? Haven't tried before... let me do above tests first.
(ps: I run Putty and write "file `which scp`" or a path to file?
CoolWater
Power Member
Power Member
Posts: 739
Joined: 2003-03-27, 16:33 UTC

Re: New SFTP plugin available now

Post by *CoolWater »

Yes, just run file `which scp` after login. Just like this.

There might be the chance, that your password expired. At least from plugin view, this could be a reason why the plugin seems to hang.

Please try Putty and/or WinSCP to make sure that the login really works.
Pawel
Junior Member
Junior Member
Posts: 88
Joined: 2018-12-18, 11:54 UTC
Location: Poland
Contact:

Re: New SFTP plugin available now

Post by *Pawel »

OK, Tried WinSCP.
I think, there is something wrong with server... Maybe it doesnt support SFTP.
https://ibb.co/DKCw368

I will contact my Administrator...
Thanks for help.
-Pawel

EDIT: Yes, it is confirmed. Port 22 was blocked by some server rules...

EDIT2: It is working now! Administrator had to allow on connection via port 23 (works with WinSCP and SFTP TC Plugin).
Last edited by Pawel on 2023-08-19, 10:05 UTC, edited 2 times in total.
Post Reply