Simple ssh tunnel – SOCKS proxy

There are a lot of articles and blog post on the wild wild web about setting up a proxy or ssh tunnel on a Mac. All of the articles I’ve come across, complicate the process by either requiring browser configuration modifications, a half a dozen steps, and/or require additional software to be installed.

A buddy of my @bwoe showed me a much simpler process. 2 Steps! That’s it!
(I’m assuming you already have a machine or server to ssh into)

Open Terminal and type:

ssh -D [port number] username@yourdomain.com

You’ll need to keep this shell active. Some servers will timeout if an ssh connection is inactive for too long . Take a look at this article on oSDocs for more info.

In Network Preferences -> Advanced -> Proxies -> SOCKS Proxy
SOCKS Proxy Server = localhost : [port num]

You can save this as a new Network Location, to easily switch between the proxy and standard preferences.

, , ,

Comments are closed.