username

Saving username and password OpenVPN config

I use the openvpn command line to connect to a certain VPN site, and I get annoyed at having to find the password everytime

So, in the .ovpn file, there is a setting:

auth-user-pass

So, I create a file (lets call it new-file.txt) in the same folder as the config, and it only contains 2 lines, first line username, second password

Change the auth-user-pass line to be

auth-user-pass new-file.txt

And now it connects without prompting me for password. Super.

Obviously this is a slight security issue, but this is on a pretty secure VM on a secure machine. So its quite safe. Just think about it if you are implementing the same workaround.

OpenVPN on Linux – save password

My Linux box is secure, so why do I need to remember the extremely difficult to remember password for one of my OpenVPN connections? I don’t.

On Linux, I create a new file, with two lines in it, the first – username, the second – password:

admin
mysecret

Then, in the ovpn file used for the connection, I add this to the bottom:

auth-user-pass new_filename

Now when I connect, it logs me in automatically