summaryrefslogtreecommitdiff
path: root/bin/extra/aivpn
diff options
context:
space:
mode:
Diffstat (limited to 'bin/extra/aivpn')
-rwxr-xr-xbin/extra/aivpn26
1 files changed, 0 insertions, 26 deletions
diff --git a/bin/extra/aivpn b/bin/extra/aivpn
deleted file mode 100755
index aab90a8..0000000
--- a/bin/extra/aivpn
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-
-logn() { printf "%s\n" "$@"; }
-
-if [ "$1" = "-k" ]
-then
- pgrep -f -- "ssh.*-L.*vm" | xargs kill
- exit
-fi
-
-keyadd ehb/ai
-
-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"
-ssh vm "rasdial \"vpn.student.ehb.be\""
-ssh -f -N \
- -L 2222:10.2.160.41:22 \
- vm