输入用户名/密码和MFA时,可以从命令行使用OpenVPN罚款。例如。 sudo openvpn --config ~/conf/client.ovpn
但是,如果我随后将我的用户名和密码放在配置文件中,并使用以下命令运行它:sudo openvpn --config ~/conf/client.ovpn --auth-user-pass ~/conf/vpn.pass.conf
它跳过MFA身份验证阶段并显示以下错误:
Thu Apr 2 09:09:42 2020 VERIFY OK: nsCertType=SERVER
Thu Apr 2 09:09:42 2020 VERIFY OK: depth=0, CN=OpenVPN Server
Thu Apr 2 09:09:42 2020 Data Channel Encrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Thu Apr 2 09:09:42 2020 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Apr 2 09:09:42 2020 Data Channel Decrypt: Cipher 'AES-256-CBC' initialized with 256 bit key
Thu Apr 2 09:09:42 2020 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Apr 2 09:09:42 2020 Control Channel: TLSv1.2, cipher TLSv1/SSLv3 ECDHE-RSA-AES256-GCM-SHA384, 1024 bit RSA
Thu Apr 2 09:09:42 2020 [OpenVPN Server] Peer Connection Initiated with [AF_INET]51.179.222.40:2194
Thu Apr 2 09:09:45 2020 SENT CONTROL [OpenVPN Server]: 'PUSH_REQUEST' (status=1)
Thu Apr 2 09:09:45 2020 AUTH: Received control message: AUTH_FAILED,SESSION: Your session has expired, please reauthenticate
Thu Apr 2 09:09:45 2020 SIGTERM[soft,auth-failure] received, process exiting
是否可以将我的用户名/密码放入身份验证文件中,并提示我输入MFA?
您可以执行以下操作之一:
1)将此行添加到~/conf/client.ovpn
文件:
auth-user-pass /full/path/conf/vpn.pass.conf
2)在您的~/conf/client.ovpn
文件中添加以下几行:
<auth-user-pass>
my-username
my-password
</auth-user-pass>