Multi step Cisco Anyconnect auth in a single command

Ahmet Karalar akaralar at gmail.com
Fri Nov 4 15:13:37 PDT 2022


Hello,

I can connect to my company VPN (Cisco Anyconnect) using openconnect,
entering credentials as the CLI asks me, however I'd like to reduce
that to 1 step if possible. When authenticating, openconnect asks me:
- username
- password
- group
- second authentication method
- second authentication password (a TOTP)

I know that I can pass the first 3 using CLI flags or a config file,
however I couldn't figure out how to select the second auth method and
then pass the second auth pass to the CLI. The second authentication
method form is a form with 4 values, of which I'd like to select
option 4 (TOTP auth), and then I'll enter the TOTP. I'm using a
password manager and I'll get the TOTP from there. Is there a way to
pass option 4 for the second auth method and then the second auth
password to openconnect, so that I can connect to the VPN using only a
single command?

Thanks in advance.

Best,
Ahmet



More information about the openconnect-devel mailing list