New plugin available: SFTP

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

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

New plugin available: SFTP

Post by *ghisler(Author) »

A new plugin is now available:

SFTP (Secure FTP over SSH).

To download and install it, you need to tap on the green "+" sign (Add plugins) in the TC home folder. Direct link.

The plugin uses the sshj library because there is no OpenSSH on Android. I have modified the library a bit so it supports all Android versions since Android 1.5 (instead of >=2.3).

There are two versions of this plugin:
1. A smaller version which supports login via user name and password only. This version relies on built-in Android crypto functions. Use this if you can.

2. A large (1 MByte) version which also supports login with a client certificate. The certificate must be in PEM format (just like for the desktop version of TC), which may be password protected (recommended). If you enter a password AND specify a PEM file, TC will assume that the password is for decrypting the PEM.

Unfortunately user certificate authentication only works on Android 2.0 and later versions. The plugin is that large because it contains the entire BouncyCastle crypto library (with renamed classes to replace the incomplete Android library).

Please test it and send me feedback!
Currently this plugin is only available as a direct download. I will put the smaller version on Google Play once the beta test is over.
Author of Total Commander
https://www.ghisler.com
Yiselieren
Junior Member
Junior Member
Posts: 6
Joined: 2011-11-30, 16:14 UTC

Post by *Yiselieren »

Great! Exactly what I need, because my main system is Linux

Samsung Galaxy 2, Android 2.3.3:
- Small version works fine
- Large version doesn't work (authentification error)
DonDuracell
Junior Member
Junior Member
Posts: 5
Joined: 2012-12-19, 20:18 UTC

Post by *DonDuracell »

With my Samsung Galaxy Nexus (Android 4.2.1) I'm not able to connect to my FTP server via SFTP.

After I enter the login data I try to connect but then the login process freezes. Tried it over WiFi and UMTS / Edge (depending where I stand in my apartment).
I tried it with the first version of that plugin. The one where you use a Username and a password.

Same process with the Windows Version of TC with the Open SSH library. But here it works.
Angus Young: "Are there any silly AC/DC songs? You ask that a 40 year old wearing a school uniform?"
Yiselieren
Junior Member
Junior Member
Posts: 6
Joined: 2011-11-30, 16:14 UTC

Post by *Yiselieren »

Next report:
Samsung Galaxy S3, Android 4.0.4 (Samsung original ROM, rooted)
- Small version works fine
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

About the large version: If your client certificate file (*.pem) doesn't contain the public key, you need to put the public key (*.key) in the same directory and give it the same name as the .pem file.

2DonDuracell
1. Does your account use a login script? These can interfere with SSH login.
2. What is shown in the progress dialog when the login freezes? This could be an indication of what is going wrong.
Author of Total Commander
https://www.ghisler.com
juno12
Junior Member
Junior Member
Posts: 19
Joined: 2013-01-03, 17:06 UTC

Post by *juno12 »

Thanks for the plugin, just what I'm waiting for.
The large version works good with OpenIndiana Server. But one of our servers running windows and SilverSHielD (v5.3.19.159) does not work. Instead of the directory listing the connection is closed. The log shows:
...
SSH connection established
user requests to open command echo $LC_ALL $LC_CTYPE $LANG
SSH connection closed

instead of
...
SSH connection established
user is opening subsystem (sftp)
user has opened sftp subsystem
user requests list of directory /

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

Post by *ghisler(Author) »

Try setting the encoding of the characters manually - it depends on the server, either ANSI (local encoding) or UTF-8. It only affects the display of accents and other special characters. TC sends the echo command to determine the encoding if you don't set it yourself.
Author of Total Commander
https://www.ghisler.com
juno12
Junior Member
Junior Member
Posts: 19
Joined: 2013-01-03, 17:06 UTC

Post by *juno12 »

That's it!
Both encodings (manually set) are working.
Thank you very much :D
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Both encodings (manually set) are working.
Of course they are - but the names are stored differently on the server. Other programs may not like the encoding if you choose the wrong one.
Author of Total Commander
https://www.ghisler.com
juno12
Junior Member
Junior Member
Posts: 19
Joined: 2013-01-03, 17:06 UTC

Post by *juno12 »

Working was meant concerning the establishing of the connection. Concerning the file names UTF-8 is correct for me. Thanks for the hint.
DonDuracell
Junior Member
Junior Member
Posts: 5
Joined: 2012-12-19, 20:18 UTC

Post by *DonDuracell »

ghisler(Author) wrote:2DonDuracell
1. Does your account use a login script? These can interfere with SSH login.
2. What is shown in the progress dialog when the login freezes? This could be an indication of what is going wrong.
1. My account does not use a login script
2. The only message I see is this one.
http://www.doerr-stefan.de/tc-sftp1.jpg

Can't post URLs even though I meet the criteria mentioned after I tried it
Angus Young: "Are there any silly AC/DC songs? You ask that a 40 year old wearing a school uniform?"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have fixed the link for you.

Regarding your error: It seems that you don't even get a connection. Please check with an SSH client whether you can connect at all from your android device:
https://play.google.com/store/search?q=ssh&c=apps
Author of Total Commander
https://www.ghisler.com
DonDuracell
Junior Member
Junior Member
Posts: 5
Joined: 2012-12-19, 20:18 UTC

Post by *DonDuracell »

ghisler(Author) wrote:I have fixed the link for you.

Regarding your error: It seems that you don't even get a connection. Please check with an SSH client whether you can connect at all from your android device:
https://play.google.com/store/search?q=ssh&c=apps
Okay I have to say like always it was a OSI-Layer 8 problem (me).

I had to replace my Fritz!Box recently and the Config BackUp I played back did not have to forwarded ports I need to get to the NAS. So it's working now and I'm sorry for the confusion I caused.
Angus Young: "Are there any silly AC/DC songs? You ask that a 40 year old wearing a school uniform?"
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The SFTP plugin is out of beta now!
http://www.ghisler.com/androidplugins/download/

The new version now also supports SCP uploads and downloads. You can enable them in the settings of each connection. SCP transfers are usually much faster than SFTP transfers, but not all servers support them. So try it, and if it doesn't work, disable it.

I plan to put the plugin in the Play Store tomorrow (Friday).
Author of Total Commander
https://www.ghisler.com
charly_35
Junior Member
Junior Member
Posts: 21
Joined: 2010-03-26, 17:14 UTC
Location: France Rennes 35

Post by *charly_35 »

Thanks for your very good work Christian.
I use the SFTP plugin on my samsung SGS2 (android 4.0.4) and on my galaxy tab (android 3.2.6) both rooted.
When I connect from the SGS2 to the tab with the SFTP plugin, I am able to go up and down in the sdcard from the /mnt directory.
But when I connect from the tab to the SGS2, I am able to go up but not down anymore. The sdcard is visible as a file not as a directory. May I missed something ?
Regards Charly_35
Cdlt Charles.
Post Reply