我有很多要为我的客户端VPN服务器生成的密钥。每当我使用easy-rsa生成这样的密钥时:
./build-key client1
有一些问题的输出。所有问题都有vars
文件中定义的默认答案。
Generating a 1024 bit RSA private key
............................................++++++
.......................++++++
writing new private key to 'client1.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) [US]:
State or Province Name (full name) [CO]:
Locality Name (eg, city) [Denver]:
Organization Name (eg, company) [mycompany]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) [client1]:
Email Address [it@mycompany.com]:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /etc/openvpn/easy-rsa/openssl.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'US'
stateOrProvinceName :PRINTABLE:'CO'
localityName :PRINTABLE:'Denver'
organizationName :PRINTABLE:'mycompany'
commonName :PRINTABLE:'client1'
emailAddress :IA5STRING:'it@mycompany.com'
Certificate is to be certified until Jan 3 20:16:04 2038 GMT (9999 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
总而言之,我必须手动按下以下键:
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
ENTER
y
ENTER
y
ENTER
基本上,我只是接受所有默认答案,并对最后两个问题说“是”。是否可以使用任何标记-force
或-quiet
标志build-key
?如果没有,是否有脚本或bash技巧可用于每次执行?我找不到任何有关它的手册页。