sftp doesn't connect to android (via sftpplug)

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
zaffi
Junior Member
Junior Member
Posts: 34
Joined: 2009-03-24, 08:50 UTC

sftp doesn't connect to android (via sftpplug)

Post by *zaffi »

When I try to connect total commander via sftpplug,
I get this error: "public key has wrong format, see readme.txt..."

but the server works fine:
+ i can connect to the same IP:port via putty, so the server is responsive
+ I can connect to other (linux) servers via total commader.

I have followed the readme's instructions.:
i have x.oub, and x.pem

I even tried via putty-agent. But even though the agent's terminal connects to the android phone, sftpplug couldn NOT connect via the agent/

What else can I check?

My system:
total commander 9.0b13
sftpplug: downloaded today
libcurl.dll etc - updated this week.
windows 7
puttygen 0.68
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50909
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

How does the first line in the pem file look like? It needs to be
-----BEGIN RSA PRIVATE KEY-----
or
-----BEGIN DSA PRIVATE KEY-----

There is a newer format which begins with
-----BEGIN OPENSSH PRIVATE KEY-----

which isn't supported yet.
Author of Total Commander
https://www.ghisler.com
User avatar
zaffi
Junior Member
Junior Member
Posts: 34
Joined: 2009-03-24, 08:50 UTC

i tried 2 different formats

Post by *zaffi »

this version of puttygen has 3 different options:

-----BEGIN OPENSSH PRIVATE KEY-----
-----BEGIN RSA PRIVATE KEY-----
(and the "ssh.com" that I didn't try)

I tried both RSA and also OPENSSH version, as *.pem files, but still got the same error.

BTW:
And the pub file (openssh pub key) starts with "ssh-rsa "
and ends with "== rsa-key-20170224"

P.S.
I know very little about encryption; but I never saw a client that asks for the public key - why "sftpplug" requires the public key?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50909
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This one is the correct format:
-----BEGIN RSA PRIVATE KEY-----

And the public key: "ssh-rsa "

Make sure you enter the path to the private and public key correctly!
Author of Total Commander
https://www.ghisler.com
Post Reply