Friday, March 2, 2012

How to configure the proftpd as sftp ?

    ProFTPD is a high-performance, extremely configurable, and most of all a secure FTP server, featuring Apache-like configuration syntax, modules, and a highly customizable server infrastructure, including support for multiple ‘virtual’ FTP servers, anonymous FTP, and permission-based directory visibility. Here , i showed, how to configure the proftpd as secure ftp that is sftp for that i have used proftpd-1.3.4a.tar.gz

You can download it from the below link.


root@mughil:~#tar -zxvf proftpd-1.3.4a.tar.gz

root@mughil:~#cd proftpd-1.3.4a

Run Autoconf(Configure):

root@mughil:~#./configure --prefix=/usr/local/proftpd --without-pam --disable--auth-pam --enable-openssl --with-modules=mod_ratio:mod_readme:mod_sftp

Compiling :

root@mughil:~#make all

Installing :

root@mughil:~#make install

And create the Log file for proftpd.

root@mughil:~#touch /var/log/proftpd/sftp.log

Below is the SFTP configuration file add into the proftpd.conf file located in /usr/local/proftpd.conf

SFTP Configuration FILE :

<IfModule mod_sftp.c>
        # Configure the server to listen on the normal SSH2 port, port 22
        Port 22 " ( Your Need SFTP Port Number ) "
        SFTPEngine on
        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
       # 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
       SFTPClientMatch .*ClientSftp sftpProtocolVersion 3

You can start the proftpd by executing the command

root@mughil:~# proftpd

No comments:

Post a Comment