Two External Drives on iMac

Solution 1:

Some USB drives (typically the smaller, more portable sizes that use 2.5" hard drives) draw their power over USB (called bus-powered). Others (typically the larger 3.5" ones) have an external power adapter.

If you have one with an external adapter, you should be fine plugging it in to whichever USB port you want. Bus-powered ones plugged into a USB hub (like that in your keyboard) with other devices may not have enough power to start up, or they may start up, but the connection will occasionally drop (you'll see the drive disappear from your desktop). However it's safe to at least try plugging it in to your keyboard and see if it works. If the drive doesn't show up, try directly connecting it to a port on the back of your iMac.

Ideally you'll plug both hard drives in to the USB ports on the back of your iMac (every iMac since 2006 has at least 3, sometimes 4), which ensures maximum power and bandwidth. If you're short on ports, you can also get a standalone USB hub, which you could plug your lower-powered devices into, in order to free up ports for your drives.

Solution 2:

You may be able to, but it's probably not a good idea. Some keyboards with USB hubs (including older Apple keyboards) have hubs that only support USB 1.1 - any drive plugged in there will be very slow. Also, having the drive connected to a user-interface item (the keyboard) will make it easier to accidentally disconnect.

All iMacs I've ever used have had far more USB ports than I could possibly use. Are you sure there's not an extra unused port on the back? Can either of your drives be connected via FireWire or Thunderbolt instead of USB?