Skip to content

Instantly share code, notes, and snippets.

@leipzig
Created November 22, 2020 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leipzig/5037ef68a140d7b7cf2ae1bf8d2d9ba2 to your computer and use it in GitHub Desktop.
Save leipzig/5037ef68a140d7b7cf2ae1bf8d2d9ba2 to your computer and use it in GitHub Desktop.
expect script for connecting to drexel cisco anyconnect vpn
#!/usr/bin/expect
set PASSWD "<<yourpass>>"
set timeout 3
spawn /opt/cisco/anyconnect/bin/vpn connect vpn.drexel.edu
expect "Group:"
send -- "0\r"
expect "*Username:*"
send -- "<<yourusername>>\r"
expect "*Password:*"
send -- "$PASSWD\r"
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment