Are you absolutly sure it's the USB ports? I've had this happened to my iMac many times, usually after a hard reset. I was also under the assumption that my USB ports are dying. Today that scenario occured again and I decided to plug in other USB devices, a thumb drive and a full on 120GB drive, and they both mounted. Next I tried a USB-dongle keyboard and that also works.
So I had to conclude that the hard reset did somethingto the USB keyboard.