[Proftpd-user] Can't login using sftp

Larry Menard via Proftp-user <[email protected]> Thu, 31 Aug 2023 21:14:29 +0000
Newsgroups gmane.network.proftpd.user
Message-ID <BL3P223MB0033B49ECF4AF92EC481461181E5A@BL3P223MB0033.NAMP223.PROD.OUTLOOK.COM>
   Hi.  I'm brand new to proftpd, so might be missing something.

   I've installed proftpd on a RedHat 8 test VM from the EPEL repository.

$ rpm -qa | grep proftp
proftpd-1.3.6e-5.el8.x86_64
proftpd-devel-1.3.6e-5.el8.x86_64
$

I'm able to connect to the server on the VM using ftp and successfully login, but sftp doesn't even get off the ground.

In a terminal on the same VM, I enter command "sftp -P 2222 username@localhost", but it just returns:

ssh: connect to host localhost port 2222: Connection refused
Connection closed

I've even downloaded the source and run "sudo prxs -c -i -d mod_sftp_pam.c", which says it was successful.

Here is my "/etc/proftpd/conf.d/sftp.conf":

<IfModule mod_sftp.c>

        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/ssh/ssh_host_rsa_key
        SFTPHostKey /etc/ssh/ssh_host_dsa_key

        SFTPAuthMethods publickey password keyboard-interactive
#        SFTPAuthMethods publickey
#        SFTPAuthMethods keyboard-interactive

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

        # Enable compression
        SFTPCompression delayed

</IfModule>

At the bottom of my "/etc/proftpd.conf" I've appended:

  <IfModule mod_dso.c>
    LoadModule mod_sftp_pam.c
  </IfModule>

And I've created a "/etc/proftpd/conf.d/sftp_pam.conf" containing:

  <IfModule mod_sftp_pam.c>
    SFTPPAMEngine on
    SFTPPAMServiceName sftp
  </IfModule>

Port 2222 is open on the VM's firewall:

$ sudo firewall-cmd --list-ports
21/tcp 22/tcp 1433/tcp 2222/tcp 8080/tcp 8443/tcp 20001/tcp 59140/tcp
$

There is no "/var/log/proftpd/sftp.log" file.

Am I missing something?

Thanks.

_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html