CentOS 5
Sponsored Link

Vsftpd Over SSL/TLS2015/01/17

 
Enable SSL/TLS on Vsftpd.
[1] Configure for SSL/TLS.
[root@www ~]#
cd /etc/pki/tls/certs

[root@www certs]#
openssl req -x509 -nodes -newkey rsa:1024 -keyout /etc/pki/tls/certs/vsftpd.pem -out /etc/pki/tls/certs/vsftpd.pem

Generating a 1024 bit RSA private key
......++++++
.......++++++
writing new private key to '/etc/pki/tls/certs/vsftpd.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]:
JP
# country

State or Province Name (full name) [Some-State]:
Hiroshima
 
# state

Locality Name (eg, city) []:
Hiroshima
# city

Organization Name (eg, company) [Internet Widgits Pty Ltd]:
GTS
 
# company

Organizational Unit Name (eg, section) []:
Server World
 
# department

Common Name (eg, YOUR name) []:
www.srv.world
 
# server's FQDN

Email Address []:
xxx@srv.world
# email address
[root@www certs]#
chmod 600 vsftpd.pem

[root@www certs]#
vi /etc/vsftpd/vsftpd.conf
# add follows to the end

rsa_cert_file=/etc/pki/tls/certs/vsftpd.pem
ssl_enable=YES
# enable SSL

force_local_data_ssl=YES
# require SSL

force_local_logins_ssl=YES
[root@www certs]#
/etc/rc.d/init.d/vsftpd restart

Shutting down vsftpd:
[  OK  ]

Starting vsftpd for vsftpd:
[  OK  ]
[2] For ClientPCs' settings, start WinSCP and input login info like follows, then, select "explicit TLS" in "encryption" section.
[3] Input the password for the connect user.
[4] Just logined.
Matched Content