Bash script to autoconnect

How to customize and extend your OpenVPN installation.
Post Reply
droidus
OpenVpn Newbie
Posts: 2
Joined: Sat Aug 11, 2018 2:30 pm

Bash script to autoconnect

Post by droidus » Sat May 18, 2019 3:05 am

I wrote a bash script that auto connects, using my username and password in a file:

Code: Select all

#!/bin/bash

sudo openvpn --auth-user-pass up.txt us50.nordvpn.com.udp.ovpn
I have a file called up.txt with my username on one line, then the password on the next line.
When I run this bash script, I get this error message:

Code: Select all

Options error: Unrecognized option or missing or extra parameter(s) in [CMD-LINE]:1: auth-user-pass (2.4.4)
In my .ovpn file:

Code: Select all

auth-user-pass /home/user/Documents/Scripts/Python/up.txt

Post Reply