Skip to content

Instantly share code, notes, and snippets.

@khanh101
Forked from pupboss/ntuvpn.sh
Created April 1, 2021 10:42
Show Gist options
  • Save khanh101/3d29ffc1df33cb13ea3de116731a4a5e to your computer and use it in GitHub Desktop.
Save khanh101/3d29ffc1df33cb13ea3de116731a4a5e to your computer and use it in GitHub Desktop.
Shell script for NTU campus vpn connection
#!/usr/bin/expect
set timeout 10
spawn sudo openconnect ntuvpn.ntu.edu.sg --prot=pulse
expect "Password:"
send "ACCOUNTPWD\n"
expect "Realm"
send "Student\n"
expect "Username:"
send "UNAME\n"
expect "Password:"
send "PWD\n"
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment