Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

In OSX Lion I set ssh proxy to connect to work. All I do is

a) in terminal

ssh -D 8080 -f -C -q -N work_host_machine

b) System prefereces, proxy, set socks proxy

Step b) needs to be performed by hand, but can it be set and unset through shell or script?

share|improve this question
up vote 1 down vote accepted

Something like this:

sudo networksetup -setsocksfirewallproxy Ethernet 8080 off

...assuming your primary network service is named "Ethernet". If you need to figure out the service name, it gets a bit more complicated; see this code snippet for one way to do it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.