FG

Start configured VPN from command line (OSX)

Fresh3 days ago
Mar 15, 202681292 views
Confidence Score1%
1%

Problem

I have two VPN configurations on my mac and I would like to be able to start them from the console when I ssh into my machine. I have found the command which allows me to configure connections, but as far as I can tell not actually start one. Using Lion.

Error Output

networksetup

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Start configured VPN from command line (OSX)

Low Risk

You can also, as of at least Lion1, use the scutil command. For example, if I have a VPN service named "Foo", I could connect via: I can optionally specify a user, password, and secret using flags of the same names: The service can be disconnected via: For more detailed help, you can see the man page, or run: Update Adding a quick script to poll until the connection is established (in response to the comment from Eric B. Footnotes: It's not clear when this command was added to OSX, I have it in…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment