CMU’s VPN requires SSO login, meaning that you need to enter your Andrew ID and password every time you want to use the VPN. This is a tedious task and I decided to automate the process. The result is AutoCisco: a simple CLI tool (i.e., you must run it in terminal) that automatically opens the “Cisco AnyConnect Secure Mobility Client” app, presses “Connect”, and then enters your username and password in the SSO login page.

Installation

Simply use Homebrew:

brew tap ibehnam/homebrew-packages
brew install autocisco

Usage

Untitled

The First Time

The first time you run AutoCisco, you should enter your username and password like so:

./AutoCisco --username <your-andrew-ID> --password <your-password>

You can also see more help by using ./AutoCisco --help. AutoCisco saves these credentials in $HOME/.vpn_credentials.

alias ac="/path/to/AutoCisco --username <your-andrew-ID> --password <your-password>"

This means you can now just run ac in terminal!

Next Times

You don’t need to type your username and password in terminal anymore. Just do:

./AutoCisco

Updating Your Username/Password

Just run AutoCisco with your new username and password (like the first time) with --username and --password arguments. AutoCisco will update the $HOME/.vpn_credentials file automatically.