OpenVPN on Linux: passing username and password in command line

JOhnlw009a picture JOhnlw009a · Aug 10, 2016 · Viewed 21.1k times · Source

I am using IPVanish for using a proxy while surfing; like:

sudo openvpn --config /home/ipv/conf/ipvanish-CA-Toronto-tor-a09.ovpn

Now, I have to enter my username, after that my password. How Can I pass those two params right as one command, so that I just use one command and the username/password are being passed automatically?

Answer

Fluffy picture Fluffy · Feb 19, 2018

The previous answer didn't work for me (still asked for username and password), what did work was putting your credentials in a file (pass.txt), like this

[email protected]
password

and calling openvpn with --auth-user-pass pass.txt.

source