I followed multiple tutorials on how to make SFTP work on proFTPd (we cannot use SFTP via SSH directly for some reasons). While FTP works correctly, SFTP seems to have some issues with keys.
NOTE: We are using SQL method of storing proFTPd users.
FileZilla gives me this error: Server refused public-key signature despite accepting key!
Putty says: No authentication methods available (server sent: publickey)
sftp logs say:
public key SHA256 fingerprint: 84:66:31:21:1c:96:cb:ff:50:93:45:66:30:be:cd:a3:99:44:36:1a:34:54:2b:a2:9e:d5:db:a2:5b:16:01:bf
sending publickey OK
public key SHA256 fingerprint: 84:66:31:21:1c:96:cb:ff:50:93:45:66:30:be:cd:a3:99:44:36:1a:34:54:2b:a2:9e:d5:db:a2:5b:16:01:bf
sending userauth failure; remaining userauth methods: publickey
public key SHA256 fingerprint: 05:b3:40:06:d8:90:87:09:de:b7:67:e9:6c:39:f9:08:ae:8d:8e:12:25:79:41:a4:f6:99:ce:63:f2:c4:55:99
sending publickey OK
public key SHA256 fingerprint: 05:b3:40:06:d8:90:87:09:de:b7:67:e9:6c:39:f9:08:ae:8d:8e:12:25:79:41:a4:f6:99:ce:63:f2:c4:55:99
sending userauth failure; remaining userauth methods: publickey
error reading from client (fd 0): Connection reset by peer
disconnecting client (Connection reset by peer)
this is sftp.conf:
<VirtualHost 0.0.0.0>
Include /etc/proftpd/sql.conf
Include /etc/proftpd/tls.conf
SFTPEngine on
Port 2222
SFTPLog /var/log/proftpd/sftp.log
# Configure both the RSA and DSA host keys, using the same host key
# files that OpenSSH uses.
SFTPHostKey /etc/proftpd/ssh_host_rsa_key
SFTPHostKey /etc/proftpd/ssh_host_ecdsa_key
SFTPAuthMethods publickey
SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys
# Enable compression
SFTPCompression delayed
</VirtualHost>
</IfModule>
I have added public key to /etc/proftpd/authorized_keys
Strangely, auth.log does not contain any trace of this connection