diff options
| author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-05-04 09:19:40 +0200 | 
|---|---|---|
| committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-05-04 09:19:40 +0200 | 
| commit | 41712f9a97da7ee3c98ccbc6a17e119c09d0b7e2 (patch) | |
| tree | 9e837a156fc2af20b2149bd857755d29c8e15881 /bin/extra/aivpn | |
| parent | d1fd4c1c04b9fefcdaa21d18b0262c2a700847a9 (diff) | |
| parent | 80462e764abf047544be6026c5d67c1f54599ae5 (diff) | |
Merge branch 'main' of debuc.com:dotfiles
Diffstat (limited to 'bin/extra/aivpn')
| -rwxr-xr-x | bin/extra/aivpn | 28 | 
1 files changed, 20 insertions, 8 deletions
diff --git a/bin/extra/aivpn b/bin/extra/aivpn index aab90a8..21436ed 100755 --- a/bin/extra/aivpn +++ b/bin/extra/aivpn @@ -1,6 +1,6 @@  #!/bin/sh -logn() { printf "%s\n" "$@"; } +err() { printf "%s\n" "$@"; }  if [ "$1" = "-k" ]  then @@ -8,19 +8,31 @@ then  	exit  fi -keyadd ehb/ai +err "I: Waiting for connectivity..." +while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep "Permission denied" > /dev/null +do sleep 1 +done +  export SSH_ASKPASS="sshpass"  export SSH_ASKPASS_REQUIRE="prefer"  export PASSWORD="zot/qemu" -logn "I: Waiting for connectivity..." -while ! ssh -o ConnectTimeout=1 -o BatchMode=yes vm 2>&1 | grep "Permission denied" > /dev/null -do sleep 1 -done - -logn "I: Activating vpn" +err "I: Activating vpn"  ssh vm "rasdial \"vpn.student.ehb.be\"" + +keyadd ehb/ai  ssh -f -N \  	-L 2222:10.2.160.41:22 \  	vm + +keyadd ehb/vm_int +ssh -f -N \ +	-L 2223:10.2.160.9:22 \ +	vm +ssh -f -N \ +	-L 2224:10.2.160.10:22 \ +	vm +ssh -f -N \ +	-L 2225:10.2.160.11:22 \ +	vm  | 
