How to Install Pure-FTPD with SSL/TLS on Ubuntu Linux

|

|

The article outlines how to install and configure Pure-FTPD on Ubuntu Linux using SSL/TLS certificates, offering a more secure way of transferring files between servers and clients. After detailing how to install Pure-FTPD, it provides step-by-step instructions for creating a self-signed SSL/TLS certificate. It then explains the process of configuring Pure-FTPD with the created certificate…

This article describes installing and configuring Pure-FTPD on Ubuntu Linux with SSL/TLS certificates.

A more secure way to use FTP is via FTP over SSH or SFTP. If you cannot configure SFTP, the closest thing will be enabling SSL/TLS certificates with your setup or FTPS.

Installing Pure-FTPD with SSL/TLS on Ubuntu Linux is important because it adds an extra layer of security to your file transfer process. FTP protocol is inherently insecure, and by enabling SSL/TLS certificates, you can encrypt data being transmitted between the server and the client, making it much more difficult for anyone to intercept and read the content.

This is especially important if you transfer sensitive or confidential information over FTP.

Following the steps outlined in the article, you can install and configure Pure-FTPD with SSL/TLS on Ubuntu Linux, ensuring your file transfers are secure and protected.

How to Install Pure-FTPD in Ubuntu Linux

First, install Pure-FTPD. To install Pure-FTPD on Ubuntu Linux, run the commands below.

sudo apt update 
sudo apt-get install pure-ftpd

After installing Pure-FTPD, the commands below can be used to stop, start, and enable the server service to always start up when the server boots.

sudo systemctl stop pure-ftpd.service
sudo systemctl start pure-ftpd.service
sudo systemctl enable pure-ftpd.service

How to create a self-signed SSL/TLS certificate in Ubuntu Linux

Now that Pure-FTPD is installed run the commands below to generate a self-signed SSL/TLS certificate for the server. The commands create the server key and certificate files and store them in the/etc/SSL/private directory.

Keeping a server key and certificate file names pure-ftpd would be best, and they should live in the /etc/ssl/private directory.

sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem -days 365

After running the commands above, you’ll be prompted to answer a few questions about the certificate you’re generating… answer them and complete the process.

Generating a 2048 bit RSA private key
...+++
.+++
writing new private key to '/etc/ssl/private/pure-ftpd.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:Brooklyn
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Website for Students
Organizational Unit Name (eg, section) []:SSL Unit
Common Name (e.g. server FQDN or YOUR name) []:example.com
Email Address []:webmaster@example.com

Pure-FTPD server will use the key and certificate created above.

How to configure Pure-FTPD with SSL/TLS certificate

Once you’ve generated the server private key and certificate files, configure Pure-FTPD to use the SSL/TLS certificate created above.

To do that, run the commands below as root (sudo bash) to force Pure-FTPD to communicate over TLS.

sudo bash
echo "2" > /etc/pure-ftpd/conf/TLS

After adding the highlighted lines to the file, save it. Then, run the commands below to restart the Pure-FTPD server.

sudo systemctl restart pure-ftpd

Now grab your favorite FTP client (FileZilla), set up a new site management site, and use FTP protocol with encryption with explicit FTP over TLS. Finally, type your username and password and connect.

You should be prompted with a certificate. Accept the certificate and continue. You may check the box at the bottom of the page to trust the certificate so you don’t get prompted in the future.

It would be best if you now were transferring files securely via SSL/TLS.

That should do it!

Conclusion:

This post showed you how to install and configure Pure-FTPD in Ubuntu Linux with an SSL/TLS certificate. Please use the comment form below if you find any errors above or have something to add.

Like this:



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.