I need to use a third party web service which is accessible only through Cisco AnyConnect VPN. I'm using OpenConnect on Ubuntu to connect to this VPN using host, username, and password.
However, instead of having to manually connect every time we need to connect to the service (since the service is being consumed by a script that runs on daily basis), I would like to set it up once and have itself reconnect when the tunnel breaks.
Is there a way for us to connect
openconnect client (or any other similar client for Cisco AnyConnect) to automatically reconnect when the connection breaks.
Alternatively, is there a way to login without username and password and store that configuration somewhere so we can automatically respawn the process when it stops.
Please note that this is all on a server, so no GUI.