Let’s say, for example, that “someone” is traffic shaping our peer 2 peer connections or eavesdropping traffic in general, blocking myfavoritesite.net or any other domain/service… Here’s a really cool antidote: SSH proxy. I think it’s a really nice gesture to give someone the access on something that’s been blocked without his permission.

To use ssh as a proxy you need to set up first The ssh server on the server machine and the ssh client on you desktop (if it’s not already installed).

Create the tunnel

We need an encrypted tunnel from our client and all the way to the server so no one can spy our actions between this segment. We’re going to target our traffic to a local port, on the local machine, and the data will be “guided” to the server and the server will forward this traffic to the open internet. The segment between our server and the internet is unencrypted of course.

through terminal

Run the command below to your terminal. Assuming that your ssh server runs on port 22(which is a bad idea :P ) …

Shell

1

ssh-C2qTnN-D8080username@remote_machine.com

or for a non default port use -p port

Shell

1

ssh-C2qTnN-D8080username@remote_machine.com-p98756

Options explained:

C = Compression

2 = Ssh version 2 only

q = Quite mode, no messages will prompt the user

T = Disable pseudo-tty allocation.

n = Prevents reading from stdin. (Because it will run on the background).