FTP+SSL Certificate Security Certification

Source: Internet
Author: User
Tags ftp mkdir openssl ssl certificate root directory

[ROOT@ZHANGC server]# yum install-y vsftpd-2.0.5-16.el5.i386.rpm–nogpgcheck ' Install vsftpd '

[ROOT@ZHANGC ~]# cd/etc/pki/ca/"into the CA directory"

[ROOT@ZHANGC ca]# CD ...

[ROOT@ZHANGC pki]# Vim tls/openssl.cnf

Dir =/etc/pki/ca "root directory of CAS"

# for the CA policy

[Policy_match]

CountryName = Optional

Stateorprovincename = Optional

OrganizationName = Optional

136 Countryname_default = CN

Stateorprovincename_default = HN

144 Localityname_default = ZZ

[ROOT@ZHANGC ca]# mkdir CRL certs newcerts ' Create Missing folder '

[ROOT@ZHANGC ca]# Touch index.txt serial "Create Missing Files"

[ROOT@ZHANGC ca]# echo ">serial" Enter the starting serial number "

[ROOT@ZHANGC ca]# OpenSSL genrsa 1024 >private/cakey.pem "Generate key"

[ROOT@ZHANGC ca]# chmod private/* "Modify Permissions"

[ROOT@ZHANGC ca]# OpenSSL req-new-key private/cakey.pem-x509-out cacert.pem ' Generate certificate '

Country Name (2 letter code) [CN]:

State or province Name (full name) [HN]:

Locality Name (eg, city) [ZZ]:

Organization Name (eg, company) [Me company LTD]:ZHANGC

Organizational unit Name (eg, section) []:zhangc.com

Common name (eg, your name or your server ' s hostname) []:www.zhangc.com

Email Address []:vipzhangchao@yeah.net

[ROOT@ZHANGC server]# mkdir/etc/vsftpd/certs "Create certificate store Directory"

[ROOT@ZHANGC server]# cd/etc/vsftpd/certs/

[ROOT@ZHANGC certs]# OpenSSL genrsa 1024 >vsftpd.key ' Create key '

[ROOT@ZHANGC certs]# OpenSSL req-new-key vsftpd.key-out VSFTPD.CSR "Generate certificate request file using keys"

[ROOT@ZHANGC certs]# OpenSSL ca-in vsftpd.csr-out vsftpd.cert ' Generate certificate with certificate request file '

[ROOT@ZHANGC certs]# vim/etc/vsftpd/vsftpd.conf "Edit FTP Security certificate authentication feature"

119 Rsa_cert_file=/etc/vsftpd/certs/vsftpd.cert

Rsa_private_key_file=/etc/vsftpd/certs/vsftpd.key

121 Ssl_tlsv1=yes

122 Ssl_sslv3=yes

123 Ssl_enable=yes

124 Force_local_logins_ssl=yes

Force_local_data_ssl=yes

: Wq

FTP server with SSL Layer Security certificate to be built.

This article is from the "Art Boundless" blog, please be sure to keep this source http://zhangc.blog.51cto.com/5627676/998866

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.