Dependencies:
- homebrew
- openconnect
- tuntap
- shell access and sudo
brew update
brew install openconnect
brew cask install Caskroom/cask/tuntap # needs sudo b/c of kernel extension
sudo openconnect --user=firstname.lastname vpn.uni-konstanz.de
You will be asked interactively for your password.
If you want to connect without sudo, you can edit your sudoers file accordingly. Open the file using
sudo visudo -f /etc/sudoers
and add the line
%admin ALL=(ALL) NOPASSWD: /usr/local/bin/openconnect
If you want to script the connection, you can supply the password on stdin:
cat passwd.file | sudo openconnect --user=firstname.lastname --passwd-on-stdin vpn.uni-konstanz.de