Facebook
Banner
XMPP JavaScript Library READ MORE

Shell script to connect to VPN server

Linux, Sachin Puri, 2019-08-26 22:37:18

Prerequisite
 
1. expect
 
2. forticlientsslvpn_cli
 
#!/usr/bin/expect -f

set timeout -1
cd /opt/forticlient-sslvpn/64bit
spawn ./forticlientsslvpn_cli --server <ip-address>:<port> --vpnuser <username>
expect "Password for VPN:" {send -- "<password>\r"}
expect "to this server? (Y/N)\r" {send -- "y\r"}

expect eof




 
Note:-
 
To escape any special character like $ please use
Add Your Comment
   
    Yes! I want to receive all comments by email

No Comments Posted Yet. Be the first one to post comment