-
Install Homebrew from http://brew.sh and make sure it works
-
Install openconnect with stoken support
brew install openconnect --with-stoken
-
Install stoken
brew install stoken
-
Import your RSA token provisioning string, URL, or file with one of:
stoken import --file filename.stdid
stoken import --token token_string_or_url
-
Enter the token's password if prompted; when asked for a new one leave it blank.
-
If prompted for a PIN, use the provisioning PIN; if you don't have one, it's probably 0000
-
Check to see that ~/.stokenrc was created
-
Store your pin locally to avoid having to type it again:
stoken setpin
-
Execute the following command to connect to the VPN:
stoken | sudo openconnect --juniper --passwd-on-stdin --user=<core_id> access.motorola.com
-
Have fun!
-
In case you get the issue below, you may be running openconnect on a Mac OSX version that is too old:
grep: /etc/nsswitch.conf: No such file or directory Failed to open tun device: Invalid argument Set up tun device failed
-
Check if the openconnect version running is greater than 7.08
openconnect --version
-
If so, download the 7.08 version by running the command below:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/0601bb706f3e218dd55a4656f2c9f42c51d1f360/Formula/openconnect.rb
-
After installing, check that the version is now 7.08 and try the "Connect to the VPN" command again.
-
References:
-