My university uses Cisco anyconnect and Duo to authenticate. When logging into the vpn, I have to run anyconnect, connect to the vpn server, and type in:
userid password and a second factor 6-digit code from Duo.
The whole process is slow and annoying. Is there anything I can do to turn this into a command line operation? Can I use any open source vpn, is there a way to record my password and to get authentication at least to just be clicking yes on the duo app?
Short answer: no. There are several incompatible VPN protocols in the field. Most notably, IPsec and SSL-VPN (the two protocols supported by Cisco AnyConnect) are both mutually incompatible with the OpenVPN protocol.
You may however be able to streamline the process by running the Cisco AnyConnect command line client, typically
/opt/cisco/anyconnect/bin/vpn
, with appropriate arguments. Runfor details.