SCP Plugin for Synology Root access?

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

BullFrog
Junior Member
Junior Member
Posts: 68
Joined: 2011-06-20, 10:51 UTC

SCP Plugin for Synology Root access?

Post by *BullFrog »

Synology disabled the root access via SFTP, so the Secure FTP plugin is not working anymore (can't login with root account).

WinSCP program is still working fine with SCP access. Is there a working (alpha/beta) plugin to regain the root access from Total Commander? I really don't want to use another program just to edit a few files...
seb-
Senior Member
Senior Member
Posts: 276
Joined: 2011-11-15, 06:14 UTC
Location: DE\BN - only part time TC user after switching to Linux ;)

Post by *seb- »

I can't imagine that this is a TC dependency. If root login from WinSCP works fine and you didn't change someting in the connection profile within TC, there shouldn't be any problem..

But i just tried and can't login with root either. Admin works though, but it doesn't give real root privileges. Seems synology has changed someting, there are some threads in the forum.

If i try to ssh with root does not work as well. .. can't have a look now but i think the DS must be re-configured rather than TC, altough it is strange that WinSCP does still work...
BullFrog
Junior Member
Junior Member
Posts: 68
Joined: 2011-06-20, 10:51 UTC

Post by *BullFrog »

WinSCP still works because it is using SCP protocol instead of SFTP, and they haven't disabled SCP root privileges yet, that means all I need is just a plugin to login with SCP instead of SFTP. Or something like that.
BullFrog
Junior Member
Junior Member
Posts: 68
Joined: 2011-06-20, 10:51 UTC

Post by *BullFrog »

So there isn't a solution for this problem?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately not. I could try to add SCP myself, but there is no command to list the directory contents. The plugin would have to send something like
ls -l
which only provides partial details (e.g. no time for files older than a year) and is sometimes in foreign languages...
Author of Total Commander
https://www.ghisler.com
CoolWater
Power Member
Power Member
Posts: 734
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

WinSCP uses ls -la to do the work...
BullFrog
Junior Member
Junior Member
Posts: 68
Joined: 2011-06-20, 10:51 UTC

Post by *BullFrog »

So it is not entirely impossible? :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, it's possible. But it would require quite a lot of work...
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I have added support for SCP only servers to my plugin now! There is a new checkbox "Use SCP for everything (no SFTP)" in the connection settings now.

I have tested the plugin with ghisler.com (Centos) and a raspberry 2 (raspbian). I don't know whether it will work with your Synology, so please test it. If it fails, turn on the option "Show entire directory listings in log" and send me the log.

Plugin:
http://ghisler.fileburst.com/beta/sftpplug142beta1.zip
Sources:
http://ghisler.fileburst.com/beta/sftpplug_src142beta1.zip

The plugin tries 3 methods to get the directory listing:
1. Try to request timestamp in custom format:
ls -la --time-style="+>>%Y%m%d_%H%M%S" /home/pi/
2. If 1 fails, try to reset language to English:
LANG= && ls -la /home/pi/
3. If that fails too, use plain ls -la:
ls -la /home/pi/

The plugin currently supports folder names in English and German only. But the first two listing methods are not affected by that limitation.
Author of Total Commander
https://www.ghisler.com
CoolWater
Power Member
Power Member
Posts: 734
Joined: 2003-03-27, 16:33 UTC

Post by *CoolWater »

2ghisler(Author)

Seems to be working fine so far. Thanks!

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

Post by *Dalai »

2ghisler(Author)
Nice! Finally it works with Fli4l systems without SFTP server. Thanks!

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
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Nice to hear that, thanks for your feedback! It would be great if someone with a Synology could test this too and report back here.
Author of Total Commander
https://www.ghisler.com
User avatar
EricB
Senior Member
Senior Member
Posts: 355
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Hi,

I own a Synology DS211 and using the latest plugin with the correct settings (use SCP for everything) I was able to access everything as root on my NAS. The SCP setting is absolutely necessary, otherwise the message about not being able to initialize SFTP subsystem pops up, and no access is possible.

Just discovered this method of NAS access, which is much easier than using Putty and starting Midnight Commander.... 8)

Well done, Christian!


Regards, EricB
Henrie
Member
Member
Posts: 194
Joined: 2006-09-03, 23:12 UTC
Location: Volkel, the Netherlands

Post by *Henrie »

Thank you Christian!

I have a Synology diskstation DS414 with latest firmware DSM 5.2-5592 Update 1

I had always used WinSCP before, because I could not get access to it working with with Total Commander. So now thanks to this, I can.

My result using the Secure FTP plugin with option 'use SCP for everything (no SFTP)' the first time
Loading SSH Library
========================
Connecting to: DS414
IP address: 192.168.1.12:22
Server fingerprint:
84 CA D6 61 EE 5A B9 F6 7D 45 D1 15 CE 75 9C 99
Supported authentication methods: publickey,password
Authentication via password for user: root
Quote: echo $LC_ALL $LC_CTYPE $LANG
Quote: locale
Quote: echo $OSTYPE
Quote: ls -l
CONNECT \DS414
Get directory: \
And the next time:
DISCONNECT \DS414
========================
Connecting to: DS414
IP address: 192.168.1.12:22
Server fingerprint:
84 CA D6 61 EE 5A B9 F6 7D 45 D1 15 CE 75 9C 99
Supported authentication methods: publickey,password
Authentication via password for user: root
CONNECT \DS414
Get directory: \
Without using the option 'use SCP for everything (no SFTP)' in the dialogbox showing: 'Authenticate with password' the progress bar at 90% jumps back to 80% continuously.
When i click 'Cancel' it shows a 'SFTP Error' dialog box saying
Error: Could not initialize SFTP session!
would block
DISCONNECT \DS414
========================
Connecting to: DS414
IP address: 192.168.1.12:22
Server fingerprint:
84 CA D6 61 EE 5A B9 F6 7D 45 D1 15 CE 75 9C 99
Supported authentication methods: publickey,password
Authentication via password for user: root
Quote: echo $LC_ALL $LC_CTYPE $LANG
Quote: locale
Quote: echo $OSTYPE
Quote: ls -l
Error: Could not initialize SFTP session!
would block
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Very nice, so it seems to work as it should! Yes, you need to enable SCP since the Synology doesn't support SFTP.
Author of Total Commander
https://www.ghisler.com
Post Reply