Configure FTPS (FTP over SSL) for vsftpd on Scientific Linux 6

UPDATE (2013-05-06) This how-to does NOT work for WordPress plugin update.

There are mainly three forms of FTP:

  • FTP (File Transfer Protocol) — the original protocol. Very widely used, but not encrypted. It is becoming more and more vulnerable.
  • SFTP (SSH FTP) — FTP functions in SSH. Commands are very similar to FTP, but it is actually implemented under SSH protocol rather than original FTP. The transfer is encrypted just as other SSH applications.
  • FTPS (FTP Secure) — FTP over SSL or TLS. Basically it is still FTP, but utilizes TLS/SSL for security. Login/data can be either or both encrypted.

WordPress update supports only FTP and FTPS. If you are not going to install SFTP plugins, then either you would risk exposing your account username and password, or you need to configure FTPS for account safety.

I assume that you have already configured vsftpd for basic FTP on your server, then there is not much to modify.

First, generate SSL key and cert. Unlike previous tutorial, we generate a single .pem file which contains both key and cert this time.

openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/vsftpd/vsftpd.pem -out /etc/vsftpd/vsftpd.pem

Then modify vsftpd config file.

vim /etc/vsftpd/vsftpd.conf
# Enable SSL support
# Use implicit SSL. It uses less commands than explicit SSL, but uses an
# alternative port.
# If you use implicit SSL, you can designate port number. (Default=990)
# Whether SSL session reuse is required for data connections. (Default=YES)
# Many FTP clients don't support this (e.g. FTP Rush), then set it to NO.
# Whether anonymous users on SSL. (Default=NO)
# Force local users to use SSL for transferring data. (Default=YES)
# Force local users to use SSL for transferring password. (Default=YES)
# Define permitted protocols
# The default SSL ciphers is DES-CBC3-SHA, but FileZilla regards it as
# unsafe and rejects it. Therefore you should modify it.
# The path to cert file.
# Alternatively, you may use separate key and cert files.

Finally, restart vsftpd.

service vsftpd restart

Leave a Comment

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