[root@e2fsck ~]# openssl genrsa -des3 -out e2fsck.org.key 2048
Generating RSA private key, 1024 bit long modulus
………..++++++
………..++++++
e is 65537 (0×10001)
Enter pass phrase for e2fsck.org.key: 输入密码
Verifying – Enter pass phrase for e2fsck.org.key: 输入密码
[root@e2fsck ~]# openssl req -new -key e2fsck.org.key -out e2fsck.org.csr
Enter pass phrase for e2fsck.org.key: 输入密码
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) [XX]:CN
State or Province Name (full name) []:JS
Locality Name (eg, city) [Default City]:SZ
Organization Name (eg, company) [Default Company Ltd]:e2fsck
Organizational Unit Name (eg, section) []:e2fsck.org
Common Name (eg, your name or your server's hostname) []:*.e2fsck.org
Email Address []:root@e2fsck.org
Please enter the following ‘extra' attributes
to be sent with your certificate request
A challenge password []: 直接回车
An optional company name []: 直接回车
[root@e2fsck ~]# openssl rsa -in e2fsck.org.key -out e2fsck.org_nopass.key
Enter pass phrase for e2fsck.org.key: 输入上面的密码
writing RSA key
[root@e2fsck ~]# ls
e2fsck.org.csr e2fsck.org.key e2fsck.org_nopass.key