Hello TJ, I tried the below configuration in my proftpd.conf file.
<IfModule mod_sftp.c> <VirtualHost 127.0.0.1> SFTPEngine on SFTPLog /etc/proftpd/sftp/sftp.log # Configure the server to listen on the normal SSH2 port, port 22 Port 22 # Configure the RSA, DSA, and ECDSA host keys, using the same host key # files that OpenSSH uses. # SFTPHostKey /etc/ssh_host_rsa_key # SFTPHostKey /etc/ssh_host_dsa_key # SFTPHostKey /etc/ssh_host_ecdsa_key # Configure the file used for comparing authorized public keys of users. # SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys # Enable compression # SFTPCompression delayed # Allow the same number of authentication attempts as OpenSSH. # # It is recommended that you explicitly configure MaxLoginAttempts # for your SSH2/SFTP instance to be higher than the normal # MaxLoginAttempts value for FTP, as there are more ways to authenticate # using SSH2. MaxLoginAttempts 6 </VirtualHost> </IfModule> #<IfModule mod_sftp.c> *And got the below error while trying to do sftp. Can you please let me know if I am missing anything?* *sbaby@ubuntu:~/proftpd/proftpd-1.3.4b$ sftp sbaby@127.0.0.1 <sbaby@127.0.0.1>Connecting to 127.0.0.1...* *ssh_exchange_identification: Connection closed by remote host* *Couldn't read packet: Connection reset by peer* *Regards* *Simon* On Sat, May 15, 2021 at 10:30 PM TJ Saunders <t...@castaglia.org> wrote: > > > Thank you so much for the quick response and providing the link to > > those documents. From the documents it has the below sample > > configuration. I am planning to use only password based authentication. > > In that case do I need the parameters > > SFTPHostKey , SFTPAuthorizedUserKeys , and SFTPCompression . In > > this case how do I pass the username and password to SFTP via > > configuration. DO I need to set the parameter SFTPAuthMethods also for > > No. By default, like the rest of ProFTPD, the mod_sftp module will try to > authenticate any users/passwords via the normal /etc/passwd files on your > server. You need to go out of your way -- provide explicit configuration > directives -- to tell ProFTPD (and mod_sftp) to use anything else. > > > <IfModule mod_sftp.c> > > <VirtualHost *a.b.c.d*> > > SFTPEngine on > > SFTPLog /etc/proftpd/sftp/sftp.log > > > > # Configure the server to listen on the normal SSH2 port, port 22 > > Port 22 > > > > # Configure the RSA, DSA, and ECDSA host keys, using the same host > key > > # files that OpenSSH uses. > > SFTPHostKey /etc/ssh_host_rsa_key > > SFTPHostKey /etc/ssh_host_dsa_key > > SFTPHostKey /etc/ssh_host_ecdsa_key > > > > # Configure the file used for comparing authorized public keys of > users. > > SFTPAuthorizedUserKeys file:~/.sftp/authorized_keys > > > > # Enable compression > > SFTPCompression delayed > > > > # Allow the same number of authentication attempts as OpenSSH. > > # > > # It is recommended that you explicitly configure MaxLoginAttempts > > # for your SSH2/SFTP instance to be higher than the normal > > # MaxLoginAttempts value for FTP, as there are more ways to > authenticate > > # using SSH2. > > MaxLoginAttempts 6 > > > > </VirtualHost> > > </IfModule> > > The above looks correct. If you have trouble logging in, I would > recommend looking at the ProFTPD debug logging: > http://www.proftpd.org/docs/howto/Debugging.html > > as well as looking at the SFTPLog entries. > > Cheers, > TJ >
_______________________________________________ ProFTPD Developers List <proftpd-de...@proftpd.org> https://lists.sourceforge.net/lists/listinfo/proftp-devel