Installing the secure FTP server
In this recipe, we will learn how to install the File Transfer Protocol (FTP) server and configure it to use SSL encryption.
Getting ready
You will need access to a root account or an account with sudo
privileges.
How to do it…
Follow these steps to install the secure FTP server:
Install
vsftpd
with the following command:$ sudo apt-get update $ sudo apt-get install vsftpd
After installation, we can configure
vsftpd
by editing/etc/vsftpd.conf
.First create the SSL certificate for the FTP server:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
Next, configure Vsftpd. Add or edit the following lines in
vsftpd.conf
:anonymous_enable=no local_enable=yes write_enable=yes chroot_local_user=yes Add the SSL certificate created in the previous step: rsa_cert_file=/etc/ssl/private/vsftpd.pem rsa_private_key_file=/etc/ssl/private/vsftpd.pem ssl_enable=yes ssl_ciphers=high force_local_data_ssl=yes...