[Proftpd-user] Problem with ed25519 pubkeys in database with mod_sftp_sql

Matt Excell <[email protected]>
Newsgroups gmane.network.proftpd.user
Message-ID <CAFTJ7VHia1OEPQZP_Cq=ZNEeM-p63gegT_KnVvgmgHNOmTD0JQ@mail.gmail.com>
Hello,

Is it possible that mod_sftp_sql hasn't been updated to support ed25519
keys loaded from a db?

Here is the situation and what I've tried:

I have compiled version 1.3.7a as an Ubuntu package
(using dpkg-buildpackage and with sodium installed).

I'm using mod_sftp_sql and mod_pgsql. My configuration stores the username,
public key, etc. in the db and that works fine with RSA keys in SSH2
format. I have an ed25519 key in SSH2 format that I installed and it isn't
working.

The logs on the server just show the connection open and then close:

2020-07-23 20:08:19,150 jenkins proftpd[961] 0.0.0.0
> (localhost[127.0.0.1]): SSH2 session opened.
> 2020-07-23 20:09:23,730 jenkins proftpd[961] 0.0.0.0
> (localhost[127.0.0.1]): SSH2 session closed.


(They used to show an issue with an unsupported key type until I upgraded
to 1.3.7a and compiled with sodium.)

If I use verbose debugging on the client side, I see the following as part
of the log:

debug3: authmethod_is_enabled publickey
> debug1: Next authentication method: publickey
> debug1: Offering public key: ED25519
> SHA256:u+1dMagfZ1iuB5Bp1sgoKX2ryC+zfwxjk55nR2DoF4w /tmp/id_ed25519.sftp.test
> debug3: send_pubkey_test
> debug3: send packet: type 50
> debug2: we sent a publickey packet, wait for reply
> debug3: receive packet: type 60
> debug1: Server accepts key: pkalg ssh-ed25519 blen 51
> key_from_blob: unknown or unsupported key type
> debug1: no key from blob. pkalg ssh-ed25519
> debug2: we did not send a packet, disable method
> debug3: authmethod_lookup password
> debug3: remaining preferred: ,password
> debug3: authmethod_is_enabled password
> debug1: Next authentication method: password


and then it prompts for a password.  This doesn't happen with an RSA key -
which works fine.

The part that is concerning me is:

key_from_blob: unknown or unsupported key type
debug1: no key from blob. pkalg ssh-ed25519

So is it mod_sftp_sql or another module not recognizing the key type and
failing it, or am I barking up the wrong tree? Did I miss something in the
compile?  I've used ed25519 keys as my mainstay for years, but not on sftp.
. .

Some additional information:
The client supports them - it is the latest stable client from
openssh-client on Ubuntu and handles scp and ssh with ed25519 keys
constantly. I also tried scp and received the same result - it works with
password and RSA key but not with ed25519 keys - same error in the debug
output.

Thoughts? What can I try next?

Matt

_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.