SSH tunneling and more

Figuring out SSH et al

Okay, so I talked about how I finally set up Firefox to tunnel my HTTP traffic through an SSH tunnel. However, Internet Explorer was a different story. It’s a different story because it touches back on the reasons Firefox is still my default brower i.e. plugins. With Internet Explorer, henceforth known as IE, I can’t toggle things on and off with the ease I do so with Firefox. Currently, the setup I have with Firefox is: I can fire up my SSH connection, but choose (thanks to the SwitchProxy plugin) if I want to connect through the SSH tunnel or not. With IE, I either have to use the SSH tunnel all the time or not at all because turning the tunnel on means always having to go into Internet Connections settings and making the changes manually. I finally just figured out how to set it up correctly in IE so I’m happy anyway. I just need to remember to turn it off once I get home or get back to a trusted wireless network because for reasons I don’t really understand, IE’s connection settings seem to be the default for programs like Windows Update, Outlook, etc to connect to the internet even though I’ve clearly selected Mozilla Firefox to be my default browser. I’m certain I have gotten some facts wrong so please feel free to correct me. I went a little crazy on Facebook today. lol. I posted 3 videos (1 of my niece, the 2nd one starring yours truly and the 3rd featured M!). He’s gets a little camera shy so go check the video out and see for yourself. With that, I’m signing out. Not. šŸ™‚

Sshhhhh! Surf using SSH Tunnels. :)

Update: Forget all the crap masquerading as a tutorial that I just wrote. šŸ˜€ Please visit this website (“Secure Linux/Unix access with PuTTY and OpenSSH“) which told me everything I needed to know. From learning how to add Putty directly to Windows PATH (which allows me to run Putty.exe directly from the “Run” command), to setting up my authorized_keys file, to configuring Putty & Windows to automagically log me into my SSH server, this tutorial and article does it all!

Okay, the first time I heard of Secure Shell (SSH) tunneling was probably last year when I re-started my blog. What are SSH tunnels? Well, the most common usage for SSH tunnels is to ensure a secure passage way for your packets of information to reach their destination. In this scenario, you would use an SSH tunnel when connecting over an insecure or monitored WiFi connection. This sounds simple enough except that all the “tutorials” I stumbled upon were written by users who were running Linux or Mac. Without too much preamble, I’ll just write up what I did to get connected. As you may or may not know, my web host is Dreamhost. One of the first things I did was check out their DreamHost Wiki which is rather detailed. The easiest and simplest solution that has worked for me is the password authentication set-up. You can automate your SSH tunnel, but I haven’t figured out how to do that yet even though there are scores of how-tos. So, first things first, I’m using 2 tools:

  1. Firefox browser with SwitchProxy extension installed
  2. Putty (installed or portable) or any SSH client: I had to scour the web for a 64 bit version of Putty although the x86 or 32 bit version would have worked on my computer.

Some quick pre-requisites for SSH tunneling that I didn’t know before:

  1. you have to have a server that supports it. Luckily for me, DreamHost allows me to make the decision to have or not have SSH. For others, you may have to dig into your control panel or contact your web hosting providers to request SSH access.
  2. you need to have a soft and padded table nearby for the amounts of head-banging that will happen because searching takes a while to find the hidden gems. šŸ™‚

If you are familiar with regular FTP clients like I am, it’s a snap to set up your server’s address with the default port number of 22. In the picture, all I did was create my server address (blahblah.clom) with the port number. Then, I typed in the name of the session “blach” and hit “save” and as you can see, it saved my entry as “blach” under “Saved Sessions”.

Your next task will then be to edit “blach” session. You will do this by clicking on your saved session (in this case, blach) and hit “load”. Then, you click on the SSH entry in the left hand pane which is under “Connection”. This is the screen you should be on:

According to Dreamhost‘s instructions (which I followed), all you need to do here is write the “Source port” number in the allowed section and leave the “Destination” blank. Then, you select “Dynamic” and leave it on “Auto”. I know this is esoteric and really not doing a good job of explaining, but I’m trying to understand this myself.

Anyhow, once you have done this, scroll back up (see the first picture) and click on “Session”. Then, highlight your session (in this case, blach) and hit save to save your changes. This was the easy part. What I didn’t know was that in order to activate the SSH tunnel, you need to first open up the connection by logging into the SSH server you are using. So, you do that by opening up Putty (see the first picture again) and highlighting the session you want to open. Then, you simply click “Open”. It should ask you for a username and password in my case. There are ways to make this automated i.e. via keys, but I haven’t figured out how to get that working. Anyhow, once you are logged in, make sure you change the connection options in your browser of choice and in my case, that’s Firefox. Now, since I only intend on using the SSH tunnel on insecure WiFi networks, I needed an extension that would make it easy for to toggle between Firefox not using the SSH tunnel and using the SSH tunnel and all sites I read recommended SwitchProxy. Configure SwitchProxy as I’ve shown in the picture above and you’re all set to go!

That wasn’t so painful, was it? I kid, but seriously, if you want to know more about this stuff, Google is probably your best, yet worst friend. šŸ™‚ Happy hacking away at your computer!!