Command Line

Setting up FTP SSL

I am using vsftpd on CentOS 7. It is a secure and fast FTP server for Unix-like systems. FTP without SSL sends data in plaintext, so packet sniffers might be able to steal information like your username and password when you log in. It’s recommended that SSL is setup for FTP.

Installing vsftpd
First, enter this command into your terminal:
yum install vsftpd

Generating an SSL Certificate
Use OpenSSL to generate a certificate for vsftpd, and set the lifetime to a year (-d option). You may store it in your vsftpd folder:
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd/vsftpd.pem -out /etc/vsftpd/vsftpd.pem

Configuring vsftpd
Edit the vsftpd configuration file:
vi /etc/vsftpd/vsftpd.conf
Add/change/uncomment the following settings:

anonymous_enable=NO
ascii_upload_enable=YES
ascii_download_enable=YES
use_localtime=YES
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
rsa_cert_file=/etc/vsftpd/vsftpd.pem

Restart the vsftpd service:
service vsftpd restart
To ensure it starts automatically on reboot, key this into your terminal:
chkconfig vsftpd on


Note: Make sure that ports 20 and 21 are open (refer to this link if you’re unsure of how to do that).

Add User to Connect to FTP
Follow this to add a new user to connect to your FTP server.


Now, search for and download an FTP client that supports SSL connections to test out your new settings!


1 thought on “Setting up FTP SSL

Leave a Reply to Configure WordPress.org and Install Plugins Automatically | LuVeLLe Codes Cancel reply

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