Notice
------
Private-Key and Public-Certificate-Request files created.
Your files are:
* req: /etc/openvpn/easy-rsa/pki/reqs/client_name.req
* key: /etc/openvpn/easy-rsa/pki/private/client_name.key
Using configuration from /etc/openvpn/easy-rsa/pki/openssl-easyrsa.cnf
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName :ASN.1 12:'client_name'
Certificate is to be certified until Oct 22 14:36:17 2025 GMT (180 days)
Write out database with 1 new entries
Database updated
Notice
------
Certificate created at:
* /etc/openvpn/easy-rsa/pki/issued/client_name.crt
Notice
------
Inline file created:
* /etc/openvpn/easy-rsa/pki/inline/client_name.inline
Easy RSA 本质上是 的包装器
openssl
,因此请查找如何避免 的密码提示openssl
。正如一些明智的用户在那篇超级用户帖子中 指出的那样,设置输出文件密码的选项是--passout
,这是脚本接受的全局选项之一easyrsa
。因此尝试一下:
abc
密码在哪。已验证的解决方案
我从 切换到
gen-req
,build-client-full
以便能够在一个命令中自动完成完整的客户端构建,而无需随后对请求进行签名。该--batch
选项不再要求输入通用名称,而是使用输入名称作为通用名称。该build-client-full
命令还会创建一个位于 的内联文件,/etc/openvpn/easy-rsa/pki/inline/
其中包含证书、密钥和 CA。否则,如果您在 EasyRSA 中未使用
--batch
输入的名称作为通用名称 (CN) 的选项,则需要修改 vars 文件,然后--req-cn
在生成证书请求时使用该标志。varsset_var EASYRSA_REQ_CN "your_common_name"
文件中的命令将设置默认 CN,而 --req-cn 标志允许您针对特定请求(例如生成服务器或客户端证书时)覆盖该 CN。这两个命令已在实际 OpenVPN 设置中验证有效。其中一个命令以文件为选项,另一个命令以内联密码为选项:
注意:您必须位于 /etc/openvpn/easy-rsa/ 目录中,或者 easy-rsa 所在的任何位置,命令才能起作用。
这是无需用户干预的输出: