How to Install the secure FTP server on ubuntu server 20.04
Follow these steps to install the secure FTP server:
Installing FTP server
Step 1 : Install vsftpd with the following command
sudo apt-get update
sudo apt-get install vsftpd
Step 2 : After installation, we can configure vsftpd by editing /etc/vsftpd.conf
Configure an FTP server with SSL/TLS
Step 3 : 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
Step 4 : 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
force_local_logins_ssl=yes
Step 5 : Save and exit the configuration file. Restart the Vsftpd server:
sudo service vsftpd restart
Step 6 : Now you can use any FTP client that supports the SFTP protocol to connect to your FTP server. The following is the configuration screen for SFTP client FileZilla: