Server: server1
Existing cert:server1-20140911.cer
Implementation steps:
Before starting the task vsftpd folder and configuration files ( cert and privatekey files ) were backed up
· Back up configuration folder
# mkdir /tmp/CertRen_20160907
# cp –rvpf /etc/vsftpd/sslcert/* /tmp/CertRen_20160907/
# cp –rvpf /etc/vsftpd/sslcert/server1-20140911.cer /tmp/
#mkdir /tmp/vsftpd_201610907
# cp –rvpf /etc/vsftpd/ /tmp/ vsftpd_201610907/
· Generating CSR
# cd /etc/vsftpd/sslcert
# openssl genrsa -des3 -out server1-07sep2016.pem 2048
Enter pass phrase for server1-07sep2016.pem: password
Verifying - Enter pass phrase for server1-07sep2016.pem: password
# openssl req -new -key server1-07sep2016.pem -out server1-07sep2016.csr
Enter pass phrase for server1-07sep2016.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) [GB]:CA
State or Province Name (full name) [Berkshire]:ONTARIO
Locality Name (eg, city) [Newbury]:TORONTO
Organization Name (eg, company) [My Company Ltd]:SYMANTEC.COM
Organizational Unit Name (eg, section) []:GIST
Common Name (eg, your name or your server's hostname) []:20237915
Email Address []:x_y@SYMANTEC.COM
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:password
An optional company name []:SYMANTEC.COM
· Download cert using .csr generated above & authorisation code provided by cert management team from Internal link
· Copy the new cert to the location /etc/vsftpd/sslcert/
· Changes in vsftpd.conf
Make entry of the newly generated .cer & .pem to line /etc/vsftpd/vsftpd.conf
(Line no.140 & 142 in screenshot below)
# vim /etc/vsftpd/vsftpd.conf
Replacing the cert and pem files with new one and change the same in vsftpd.conf file
rsa_cert_file=/etc/vsftpd/sslcert/server1-20140911.cer
rsa_private_key_file=/etc/vsftpd/sslcert/server1-20140911.pem
[root@server1 sslcert]# service vsftpd restart
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: Enter PEM pass phrase:
[ OK ]