Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

up vote 1 down vote accepted

Something like this:

sudo networksetup -setsocksfirewallproxy Ethernet 127.0.0.1 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
add comment

Your Answer

 
discard

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.