Friday, May 18, 2007

Annoyance solved: Putty and OpenSSH keys

Since I'm a notorious windows user, I alternate between using Cygwin's (or any *nix variant) openSSH client and Putty to connect to various SSH hosts. The only problem is that the openSSH-generated private key is not compatible with Putty.

Private keys with SSH allow you to access a remote host without typing your password if the place you're logging in from is a place you trust enough to say, "hey, whenever I log in from this computer, you don't need to ask me for my password." I trust my own laptop enough to store a private key on there. It works great with open-ssh - I just ssh into a host that I've granted my accepted public key to and it lets me in right away without asking for a password. However, for whatever reason, Putty (the really good and simple ssh client) doesn't like ssh private keys. Since I move my private keys around from trusted computer to trusted computer where I use putty and open-ssh interchangeably, it's kind of annoying for Putty to not accept my open-ssh generated key.

Anyway, with PuTTYGen, you can convert the open-ssh keys to a putty-friendly key. The process is as follows:

  1. Create your private key using ssh-keygen.
    $ ssh-keygen -t dsa
    This places the public ( and private (id_dsa) keys in your ~/.ssh directory.

  2. Copy your public key into each remote host you'd like to log in without using a password
    $ scp ~/.ssh/
    Note that the .ssh directory should already exist. If it doesn't, create it.

  3. Test it to make sure it works:
    $ ssh
    This will hopefully let you in to the remote host without asking for your password. If it doesn't, log in to the remote host, change the permissions to 700 on ~/.ssh/authorized_keys2, exit, and try again. If it still doesn't work, use your favorite search engine to figure it out and then come back here.

  4. Convert the key into a putty-friendly key by using PuTTYgen. Start the application, then click "Load", point it to the ~/.ssh/id_dsa file (not, and convert. Save it as a new key - puttygen will add the file extension "ppk" to the file.

  5. Start up putty, load your favorite remote host profile, go to the Connection->SSH->Auth section of the profile and configure the Private Key for Authentication to point to the newly-generated ppk file.

Now both putty and open-ssh can be allowed entry using the same public key. No more password entry! Works well with svn, cvs, ssh, scp, sftp, whatever.

Wednesday, May 02, 2007

Teen disciplined for creating campus replica

When I read this headline, I was absolutely appalled. A school discovered that one of its students had created a map of the school's campus for the video game "counter strike" and completely freaked out. Counter strike is a FPS where you basically blast terrorists. Yes, it's a violent game involving guns. But is this something for a school to freak out about?!?

When I was an undergrad at a Christian college, I had created a map of our campus for the game Doom 2. (Wow, that dates me a bit!) Not only did I make a map of the school campus, I also made a map of our house and other real buildings. It's fun making maps of familiar places. I obviously didn't plan on any terrorism acts inside my own house! Anyway, my (Christian) friends and I had a blast blowing each other up in familiar buildings. Is this at all related to any terrorist activity?!? Lord help us, because we've got a host of bible-thumping terrorists at large in the US if this is the case!!

Being someone who strangely enjoyed creating a map of a familiar area for the sole purpose of blowing up monsters and other hapless fellow players who happened to be wielding BFG3000's, I can assure you that this has absolutely nothing to do with terrorism. It's a creative outlet that adds more fun to a game. The motivation is purely that of "wouldn't it be cool to annihilate each other in the cafeteria" as opposed to "let's use this map as a training ground for killing real people."