#/etc/proftpd/sftp.conf SFTPEngine ON Port 60022 SFTPHostKey /etc/proftpd/ssh/ssh_host_rsa_key SFTPHostKey /etc/proftpd/ssh/ssh_host_ecdsa_key SFTPLog /var/log/proftpd/sftp.log SFTPCompression delayed # Auth methods SFTPPAMEngine off #SFTPAuthMethods publickey password #SFTPAuthorizedUserKeys file:/etc/proftpd/ssh/authorized_keys/%u #UseReverseDNS off #K -> ##Virtual user su file #Makes it easier to create virtual users RequireValidShell off #Use alternative password and group file (passwd uses crypt format) AuthOrder mod_auth_file.c AuthUserFile "/etc/proftpd/ftpd.passwd" AuthGroupFile "/etc/proftpd/ftpd.group" #uid e gid DirFakeUser on ~ DirFakeGroup on ~ # you may not like the bandwidth control below # TransferRate RETR|STOR|APPE|STOU KBrate:freebytes #TransferRate RETR 20:0 #Chroot everyone DefaultRoot ~ #<- K ------------------- iptables -I INPUT -p tcp --match multiport -d port 49152:65535 -j ACCEPT Feb 12 13:09:35 serverftp proftpd[17589]: 2021-02-12 13:09:35,489 serverftp proftpd[17596] 10.1.1.111: mod_sftp/1.0.0: error reading passphrase for SFTPHostKey '/etc/ssh/ssh_host_rsa_key': (unknown) Feb 12 13:09:35 serverftp proftpd[17589]: 2021-02-12 13:09:35,489 serverftp proftpd[17596] 10.1.1.111: mod_sftp/1.0.0: unable to use key in SFTPHostKey '/etc/ssh/ssh_host_rsa_key', exiting Feb 12 13:09:35 serverftp proftpd[17589]: . Feb 12 13:09:35 serverftp systemd[1]: Started LSB: Starts ProFTPD daemon. https://forum.virtualmin.com/t/proftpd-issue-on-debian-10-error-reading-passphrase-for-sftphostkey/104835/2 https://www.yoctobe.com/linux/configure-proftpd-to-use-sftp/ https://linuxadmin.io/configure-proftpd-sftp-centos/ https://www.mybluelinux.com/proftpd-server-with-virtual-users-and-in-sftp-mode/ SFTPEngine ON Port 60022 SFTPHostKey /etc/proftpd/ssh/ssh_host_rsa_key SFTPHostKey /etc/proftpd/ssh/ssh_host_ecdsa_key SFTPLog /var/log/proftpd/sftp.log SFTPCompression delayed # Auth methods SFTPPAMEngine off #SFTPAuthMethods publickey password #SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys/%u #Opzioni di default gia in proftpd.conf # DefaultRoot ~ # RequireValidShell off # AuthUserFile /etc/proftpd/ftpd.passwd # AuthGroupFile /etc/proftpd/ftpd.group # AuthOrder mod_auth_file.c # UseReverseDNS off #K -> ##Virtual user su file #Makes it easier to create virtual users RequireValidShell off #Use alternative password and group file (passwd uses crypt format) #AuthOrder mod_auth_file.c #vedi sopra AuthUserFile "/etc/proftpd/ftpd.passwd" AuthGroupFile "/etc/proftpd/ftpd.group" #uid e gid DirFakeUser on ~ DirFakeGroup on ~ # you may not like the bandwidth control below # TransferRate RETR|STOR|APPE|STOU KBrate:freebytes #TransferRate RETR 20:0 #Chroot everyone DefaultRoot ~ #<- K