Page 1 of 1

Bash script to autoconnect

Posted: Sat May 18, 2019 3:05 am
by droidus
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