Last active
May 14, 2020 10:02
-
-
Save BlkPingu/b52f6ad4a87c8119520bbb24c2585a95 to your computer and use it in GitHub Desktop.
Connect to HTW Berlin VPN via cisco CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
arg1=$1 | |
# 0) HTW-SSL-Split | |
# 1) HTW-SSL-VPN-Full | |
# 2) HTW-SSL-VPN-Split | |
group=2 | |
[email protected] | |
password=secret! | |
#known hosts: | |
# - SSL-VPNCL-HTW | |
host=SSL-VPNCL-HTW | |
if [ "$arg1" == "-c" ] | |
then printf "$group\n$username\n$password" | /opt/cisco/anyconnect/bin/vpn -s connect $host | |
elif [ "$arg1" == "-dc" ]; | |
then /opt/cisco/anyconnect/bin/vpn -s disconnect | |
else | |
printf "give args pls: \n[c] - connect to htw-vpn \n[dc] - disconnect from htw-vpn" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment