PROJET AUTOBLOG


Shaarli - Librement Shaarli

Site original : Shaarli - Librement Shaarli

⇐ retour index

Note: Mettre en place SFTP à la place de FTP sur proftpd

jeudi 27 septembre 2018 à 16:19
#commandes utiles
systemctl status proftpd.service
tail -f /var/log/proftpd/*
netstat -naop | grep proftpd

# to do :
nano /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

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

        # Enable compression
        SFTPCompression delayed

</IfModule>



mkdir -p /etc/proftpd/authorized_keys/
ssh-keygen -e -f pub_rsa_mike >/etc/proftpd/authorized_keys/mike
sudo service proftpd reload
# Le port 21 ne doit plus être en écoute.

Permalink