Hello I'm trying to access openvpn from ubuntu command line by trying to enter the sudo password and the username and password for openvpn altogether based on those answers:
sudo password from command line:
Use sudo with password as parameter
openvpn username and password from command line:
linux: passing username and password in command line
This is the command I'm entering:
echo 12345 | sudo -S openvpn <openvpnpath> --auth-user-pass pass.txt
Where inside pass.txt I have:
a@gmail.com
56789
But I'm getting the following error:
Options error: I'm trying to parse "/etc/openvpn..." as an --option parameter but I don't see a leading '--' Use --help for more information.
Am I missing something? Thnks!
Did you try --config
? Just:
echo 12345 | sudo -S openvpn --config /path/to/config.file --auth-user-pass pass.txt