I am having some trouble writing a script that will launch my forticlient vpn command line client and send my password when it is prompted. Here is my code:
You may use forticlientsslvpn_cli with Expect to feed in the password.
forticlientsslvpn_cli
A complete solution available here:
https://gist.github.com/azizasm/e216bc47b54f5b68405f3c8f8b832e8a
Note: this solution will auto reconnect the if the VPN get disconnected.