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:
#!/usr/bin/expect -f set timeout -1 cd /usr/local/forticlientsslvpn spawn ./forticlientsslvpn_cli --server myhost:10443 --vpnuser myuser expect "Password for VPN:" {send -- "mypassword\r"} expect "to this server? (Y/N)\r" {send -- "y\r"} expect eof