Package: proftpd-basic
Version: 1.3.6-4

I think there is something wrong with the sftp module in buster
because proftpd cant read ssh Host keys

i also tried to recreate the keys with dpkg-reconfigure openssh-server
or manually by ssh-keygen -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key
and i tried to create keys on a Debian 9 machine and copied them on the Debian 10 machine.
so i think it isn't the key its the module.

How to reproduce

Install Debian 10 minimal

apt install proftpd-basic

create minimal sftp config
echo '<VirtualHost 192.168.1.15>
        DefaultRoot             ~
        RequireValidShell       off

        SFTPEngine              on
        Port                    2222
        SFTPLog                 /var/log/proftpd/sftp.log

        SFTPHostKey             /etc/ssh/ssh_host_rsa_key

        SFTPAuthMethods         publickey keyboard-interactive

        #SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys/%u

        # Enable compression
        SFTPCompression delayed

</VirtualHost>' > /etc/proftpd/conf.d/sftp.conf

Restart Service

systemctl restart proftpd

get broken service

root@proftpd-test:/etc/proftpd/conf.d# systemctl status proftpd
● proftpd.service - LSB: Starts ProFTPD daemon
   Loaded: loaded (/etc/init.d/proftpd; generated)
   Active: active (exited) since Thu 2019-07-18 15:29:38 CEST; 42min ago
     Docs: man:systemd-sysv-generator(8)
Process: 817 ExecStart=/etc/init.d/proftpd start (code=exited, status=0/SUCCESS)

Jul 18 15:29:38 proftpd-test systemd[1]: Starting LSB: Starts ProFTPD daemon... Jul 18 15:29:38 proftpd-test proftpd[817]: Starting ftp server: proftpd2019-07-18 15:29:38,355 proftpd-test proftpd[825]: processing configuration directory '/etc/proftpd/conf.d/' Jul 18 15:29:38 proftpd-test proftpd[817]: Wrong passphrase for this key. Please try again. Jul 18 15:29:38 proftpd-test proftpd[817]: Wrong passphrase for this key. Please try again. Jul 18 15:29:38 proftpd-test proftpd[817]: Wrong passphrase for this key. Please try again. Jul 18 15:29:38 proftpd-test proftpd[817]: 2019-07-18 15:29:38,362 proftpd-test proftpd[825] proftpd-test.mm-com.de: mod_sftp/1.0.0: error reading passphrase for SFTPHostKey '/etc/ssh/ssh_host_rsa_key': (unknown) Jul 18 15:29:38 proftpd-test proftpd[817]: 2019-07-18 15:29:38,362 proftpd-test proftpd[825] proftpd-test.mm-com.de: mod_sftp/1.0.0: unable to use key in SFTPHostKey '/etc/ssh/ssh_host_rsa_key', exiting
Jul 18 15:29:38 proftpd-test proftpd[817]: .
Jul 18 15:29:38 proftpd-test systemd[1]: Started LSB: Starts ProFTPD daemon.


--
Mit freundlichen Grüßen / best regards
Markus Raps

Reply via email to