SSH Tunnel

Let's say your ISP blocks you from visiting certain websites. There are various ways of bypassing such restrictions. Here's how I do it using SSH tunnels.

  • Get a domain hosting account with ssh shell access from an overseas provider.
  • It's always great to setup key based authentication and ssh-agent. Here's how.
  • $ alias ssh-tunnel='ssh -N -v -D 8080'
  • Run ssh-tunnel from a local shell.
  • Install the SwitchProxy Firefox extension and configure it to use as a Socks v4 proxy.
  • Test your setup. e.g., if you are in Singapore, try ;-)
  • Since we used the verbose (-v) flag, you should see connection information in the tunnel's shell output.

Note: This does not provide anonymity! Use Tor or JAP for that!

The traffic over this tunnel will count towards the monthly bandwidth quota of your hosting provider. Since I get over one terabyte of monthly transfer with Dreamhost, I am not so concerned about this factor. :-)


So i asked my better half to take a look at this post and tell me whether the writer was jobless or plain geek...

Answer: jobless geek

hehe.. takes one to know one ;)

A few weeks ago i tried to run putty at work to setup a ssh-tunnel over my dreamhost account, hoping that i would be able to use it to browse the web and to check my imap mail. However putty couldn't make a connection to the dreamhost server, so i guess port 22 is blocked at our firewall. Now i'm wondering if it is somehow possible (and allowed by dreamhost) to use ssh on another port, like 8080, which is not blocked by the firewall?

I doubt if you can do much about that. Try writing to dreamhost support about non-standard port ssh logins.

I realize this is almost a year later, but I just stumbled across this.

Putty can use an HTTP proxy to connect. That would get you aground the blocked 22 port.

good job mate, everybody gotta proxy

i get Proxy Server Refused Connection.

Any idea why?

That sure sounds like simple steps. But unfortunately, I am stuck right at step1. I logged in the dreamhost and created an SSH key but dont know what to do next. Could you please explain this in detail. I am a complete newbie.

Thank you for taking the time.

Ok I think I got it to step "Run ssh-tunnel from a local shell."

But then i get the following

abc-defs-macbook:.ssh abcdef$ scp .ssh/ <server_name>: abcdef@<server_name>'s password:

Permission denied (publickey,password). lost connection

I have no clue as to what password to give here? Please help

Got it! dreamhost did not have a user with name abcdef. Hence the error.

Created a new user with shell access and got it working.

3+3 always = 6

@Sandeep: Glad to see that you got it working.

Markdown formatting supported