Skip to content

Instantly share code, notes, and snippets.

@jcouyang
Last active August 29, 2015 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcouyang/edd59391826d8c9e6045 to your computer and use it in GitHub Desktop.
Save jcouyang/edd59391826d8c9e6045 to your computer and use it in GitHub Desktop.
connect cisco anyconnect in terminal
#!/bin/sh
/opt/cisco/anyconnect/bin/vpn -s $1 blur.blur.com <<"EOF"
0
your.name
your.password
y
exit
EOF
@jcouyang
Copy link
Author

just fill in your user name and password

then

sudo cp vpn /usr/local/bin
vpn connect/disconnect

Analytics

@jiukunz
Copy link

jiukunz commented Jul 14, 2014

!/usr/bin/expect

set addr "mel-vpn.realestate.com.au"
set user "name"
set pass "password"

set timeout -1
spawn /opt/cisco/anyconnect/bin/vpn connect $addr

expect "Group: "
send "1\r"

expect "Username: "
send "$user\r"

expect "Password: "
send "$pass\r"

expect ">> state: Connected"

@iambowen
Copy link

你们这是干嘛,暴露客户VPN地址…………别这样好么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment