James John – Software Engineer

Use SSH as Proxy for Secure Connection in Linux

Internet is cool but still security matters, if you jump into my network I can monitor your data (webpages you load) but if they are secure i.e. loading to SSL then I can’t read or access those.

Now SSH is Secure Shell using SSL for communication between local and online server and we are gonna utilize this SSL for our connections to making every webpage you load pass through a secure connection and make it encrypted. We are gonna forward every connection to a SSH server by running this:

ssh -D 8080 user@server...

Once you are connected to the SSH server, test the connection using curl. Trying this

curl --proxy 127.0.0.1:8080 http://testsite.com

The above returns no reply from server

curl --socks5 127.0.0.1:8080 http://testsite.com

But the above gets a reply, this SSH function does not support HTTP Proxy but SOCKS4 and SOCKS5 for now. So configure your FireFox, goto Tools->Options->Advanced->Network->Settings; choose Manual Proxy Configuration then leave other fields empty only fill the  SOCKS Host and save. Enjoy your secure browsing… 🙂

James John

Software Engineer