Created
February 26, 2013 19:06
-
-
Save tlehman/5041126 to your computer and use it in GitHub Desktop.
Connect Viscosity VPN client for current user FROM THE COMMAND LINE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env osascript | |
on run argv | |
tell application "Viscosity" | |
Connect argv | |
end | |
end |
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
To use, run
./viscosity_connect.applescript $(whoami)