Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There must be a way to control the built-in VPN client in OS-X Snow Leopard, I simply can't find documentation about it. I want to be able to connect and disconnect while I'm ssh'd into my box remotely. Does anyone know how to do that?

share|improve this question
up vote 1 down vote accepted

save the following AppleScript to gfw.scpt

tell application "System Events"
    tell current location of network preferences
        set VPNservice to service "The Great Fire Wall" -- name of the VPN service
        if exists VPNservice then connect VPNservice
        set isConnected to connected of current configuration of VPNservice
        if isConnected then
            --- do something or nothing
        end if
    end tell
end tell

use osascript gfw.scpt to start it from terminal.

share|improve this answer
Gotta love AppleScript... so verbose. :( – Michael Caron May 7 '10 at 13:22
I'm using this in which works ok. Does it work for you via ssh? – freewizard May 19 '10 at 5:37
No: startIntelix.scpt:50:58: script error: Expected end of line but found identifier. (-2741) – Michael Caron May 24 '10 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .