Quickie – ssh dynamic port forwarding to avoid unsecured public networks

You’re in an airport, and there’s free wifi (you’re obviously not in the US…). You want to connect but are worried about someone sniffing your connection. You’re rich, so you have a remote box with ssh access to it.

The solution is to ssh into your remote box and forward all your traffic to it. It will be your secure proxy for your session.

Easy to do:

Open a terminal and issue:

ssh -D 8888 remote-host

This will start port dynamic port forwarding to the remote-host machine.

Then, set up a proxy on your local machine to proxy all localhost traffic to port 8888.

On the Mac, it looks like this:


Presto, as long as the terminal is open with the ssh -D command running, all your internet communications will pass through to the remote-host using the secure socket connection.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s