Daily Shaarli

All links of one day in a single page.

September 27, 2018

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

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