I used Cisco Secure Client for many years. We had password only, so I could script the login to basically the following:
vpncli.exe -s < "C:\Temp\a.txt"
with C:\Temp\a.txt providing three lines:
connect site/realm
username
password
Now, my company introduced 2FA with OTP. I changed my script to ask me first about the OTP, then put all the info in a temporary file (that is what was in a.txt plus the OTP on a 4th line), but this always fails.
If I do it interactively (so vpncli.exe; then connect site/realm; then password and finally the OTP) it works. But never with the script. The answer to the script is finally just:
>> Login failed.
Any ideas? Thanks.