summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/extra/aivpn28
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