File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Automation/src/Connect_to_openvpn Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change
1
+ Script to connect to vpn via openvpn with free vpnbook.
2
+ Before using it is required to install openvpn, dowload config from vpnbook and show path to its in script
3
+ From time to time vpnbook changes password and it is required to change it in a script by hand.
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ cd ~ /Downloads/vpn-de
3
+ username=" vpnbook"
4
+ password=" hd4se2m"
5
+ read -sp " Enter Sudo Password: " sudopassword
6
+ /usr/bin/expect << EOF
7
+ spawn sudo openvpn vpnbook-de4-tcp80.ovpn
8
+ expect "password for $USER : "
9
+ send "$sudopassword \r"
10
+ expect "Enter Auth Username: "
11
+ send "$username \r"
12
+ expect "Enter Auth Password: "
13
+ send "$password \r"
14
+ expect "$ "
15
+ EOF
You can’t perform that action at this time.
0 commit comments