Skip to content

Instantly share code, notes, and snippets.

@tlehman
Created February 26, 2013 19:06
Show Gist options
  • Save tlehman/5041126 to your computer and use it in GitHub Desktop.
Save tlehman/5041126 to your computer and use it in GitHub Desktop.
Connect Viscosity VPN client for current user FROM THE COMMAND LINE
#!/usr/bin/env osascript
on run argv
tell application "Viscosity"
Connect argv
end
end
@tlehman
Copy link
Author

tlehman commented Feb 26, 2013

To use, run ./viscosity_connect.applescript $(whoami)

@tlehman
Copy link
Author

tlehman commented Feb 26, 2013

To automate connecting to VPN before ssh'ing, use the following bash function

function vpn_then_ssh() {
  ./viscosity_connect.applescript $(whoami)
  ssh $1
}

Then just type vpn_then_ssh foo.hostname.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment