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 loadme "./forticlientsslvpncli --server myvpnserver --vpnuser theuser
eval spawn $loadme
expect "Password for VPN: "
send "password\r"
However, it still prompts for the vpn password. I am sure it is something simple and I am pretty new to linux scripting, but any help would be greatly appreciated!
Thanks!