Linux Blog

Using SSH as a Proxy

Filed under: General Linux,Quick Linux Tutorials — at 2:46 pm on Tuesday, April 15, 2008

A helpful reader left a comment on this blog about using SSH as a Socks Proxy. Here is how to do it.

ssh -D [source port] [host]

Thats it, once your logged in you are good to go.

Now, the problem I ran into was making Firefox use this proxy. I found a great extension called SwitchProxy which can be installed from the extensions site. Once installed, you can easily switch between proxies. This is really useful to use while at a coffee shop.

Check out the screenshot of the toolbar that it installs (click for a larger image):

Using SSH as a proxy on Linux

It makes it really easy to turn the proxy on or off. One day if there is interest I might try to extend this to establish the SSH connection.

Man Pages for commands in this post »



Pingback by The Linux Blog » Setting up a VPN with pptpd

January 19, 2011 @ 9:02 am

[…] for some time was to set up a VPN for home use. Sure, I can do some remote SSH port forwarding, use ssh as a proxy or perhaps even use some Linux Tunneling Techniques but they’re not quite the same as a full […]

Comment by xinul12

August 14, 2011 @ 2:00 pm

Oh didn’t know that I can use SSH as a proxy. Nice explanation mate!
I currently use proxies from a proxylist site like but now I will set up a ssh proxy :D

Thanks again! Very good post!


RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>