Re: [Proftpd-user] Can't login using sftp

Matus UHLAR - fantomas <[email protected]> Fri, 1 Sep 2023 10:37:33 +0200
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>
On 31.08.23 21:14, Larry Menard via Proftp-user wrote:
>   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":

is this included by default?

><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>

are you sure mod_sftp is loaded? (I don't have redhat 8). 

>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

this only lists ports allowed on firewall, it does not mean any process is 
listening on those ports.

>There is no "/var/log/proftpd/sftp.log" file.
>
>Am I missing something?

-- 
Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
    One OS to rule them all, One OS to find them,
One OS to bring them all and into darkness bind them


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