Skip to content

Instantly share code, notes, and snippets.

@thegass
Created December 22, 2016 08:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thegass/52e0f44fbca4764a3c4f821ff0728e73 to your computer and use it in GitHub Desktop.
Save thegass/52e0f44fbca4764a3c4f821ff0728e73 to your computer and use it in GitHub Desktop.
use expect (http://expect.sourceforge.net/) to autoconnect to checkpoint vpn (snx linux cli client)
#!/usr/bin/env expect
set username your_vpn_username
set pass your_vpn_passwort
set host your.vpn.server
spawn snx -s ${host} -u ${username}
expect "Please enter your password:" { send "${pass}\r" }
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment