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:

  1. Install vsftpd with the following command:
    $ sudo apt-get update
    $ sudo apt-get install vsftpd
    
  2. After installation, we can configure vsftpd by editing /etc/vsftpd.conf.
  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
    
  4. Next, configure Vsftpd. Add or edit the following lines in vsftpd.conf:
    anonymous_enable=no local_enable=yes ...

Get Ubuntu Server Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.