2
I have 2 VPN and sometimes I should switch them very often. I decided to create .bat file which could connect to desired VPN with credentials set in this file.
So I create .bat file with following code:
vpncli.exe -s < 1.txt
Where 1.txt contains credentials of VPN #1 which has trusted cerficate. here's what 1.txt contains:
connect <vpn1.some.host>
1
<password>
Where 1 goes for GROUP with number 1.
The second VPN is untrusted and I have this prompt awaring me what VPN is untrusted. I used similar code for .bat file:
vpncli.exe -s < 2.txt
And following data in 2.txt:
connect <vpn2.some.host>
y
<GROUP>
<LOGIN>
<PASSWORD>
("y" goes for accepting untrusted server)
But now it says "Login failed" after entering password is prompted and then it appears in loop and never stops.
The question is: how should I modify my 2.txt file to make script connect to VPN #2?
What is the version of AnyConnect CLI you are trying ? Have you implemented your own CLI or just using the one shipped with AnyConnect ? – Mahesh – 2016-07-22T16:00:57.997
I didn't do anything so I guess it's the one shipped with AnyConnect. The version is 3.1.14018 – Roman – 2016-07-23T08:37:48.650