SFTP/SCP with Busybox based ls fails

Support for Android version of Total Commander

Moderators: Stefan2, white, sheep, Hacker

Post Reply
mablae
Junior Member
Junior Member
Posts: 3
Joined: 2018-03-09, 18:33 UTC

SFTP/SCP with Busybox based ls fails

Post by *mablae » 2018-03-09, 18:52 UTC

Hi there, thanks for the beautiful piece of software tc commander is.


However I am unable to use SCP Plugin on my freifunk / gluon nodes due to errors with the busybox based sshd... :(

Here is the logfile I optained when logging in. Any chance to make it work?

Code: Select all

2018-03-09 19:33:28 SFTP:Connecting...
2018-03-09 19:33:29 SFTP:Algorithm: RSA, Fingerprint: [redacted]
2018-03-09 19:33:29 SFTP:Logging in...
2018-03-09 19:33:29 SFTP:PEM: /storage/emulated/0/Documents/id_rsa.pem
2018-03-09 19:33:30 SFTP:SFTP start...
2018-03-09 19:33:30 SFTP:No SFTP, using SCP only...
2018-03-09 19:33:31 SFTP:Connect OK!
2018-03-09 19:33:31 SFTP:LIST /
2018-03-09 19:33:32 SFTP:LIST remote error: ls
2018-03-09 19:33:32 SFTP:LIST remote error: : unrecognized option: 
2018-03-09 19:33:32 SFTP:LIST remote error: time-style=+>>%Y%m%d_%H%M%S
2018-03-09 19:33:32 SFTP:LIST remote error: 

2018-03-09 19:33:32 SFTP:LIST remote error: BusyBox v1.25.1 ()
2018-03-09 19:33:32 SFTP:LIST remote error:  multi-call binary.

Usage: ls 
2018-03-09 19:33:32 SFTP:LIST remote error: [-1AaCxdLHRFplinsehrSXvctu] [-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	Follow symlinks
	-H	Follow symlinks on command line
	-R	Recurse
	-p	Append / to dir entries
	-F	Append indicator (one of */=@|) to entries
	-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
Last edited by mablae on 2018-03-09, 21:13 UTC, edited 2 times in total.

mablae
Junior Member
Junior Member
Posts: 3
Joined: 2018-03-09, 18:33 UTC

Post by *mablae » 2018-03-09, 18:59 UTC

Maybe have a check if "ls" is busybox based and then use option -e -l to have full date and time display?!

Would need some abstraction layer, but many embedded devices would profit from a fix!


Thanks in advance. Please let me know what is possible ;-)

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

Post by *ghisler(Author) » 2018-03-12, 14:41 UTC

The plugin first sends ls command with parameter
time-style=+>>%Y%m%d_%H%M%S
to get full time details. If this returns an error, TC uses simpler ls commands. For unknown reasons, this detection fails on your server.

Could you create a test account for me, so I could try this in a debugger? Please send the account details to support at ghisler dot com. I do NOT need write access, a subdirectory with some sample files and folders inside is fully sufficient.

Alternatively, can you tell me how to setup this server either on a PC with Linux, or a Raspberry PI? Thanks.
Author of Total Commander
http://www.ghisler.com

mablae
Junior Member
Junior Member
Posts: 3
Joined: 2018-03-09, 18:33 UTC

Post by *mablae » 2018-03-12, 17:57 UTC

Thanks for your reply!

The problem arises on current freifunk / gluon based router firmwares.

I will setup a keypair for you on a local instance I have.

It needs to be accessed by IPv6, too.

Post Reply