Debian WPA wireless configuration

Wireless in Linux has always been a pain if you don't have a GUI such as Gnome or KDE. In Debisn 6.03 (Squeeze) add the following to /etc/networking/interfaces:

allow-hotplug wlan0
auto wlan0
iface wlan0 inet dhcp
    wpa-ssid YOUR_SSID_HERE
    wpa-proto WPA
    wpa-group TKIP
    wpa-pairwise TKIP
    wpa-key-mgmt WPA-PSK
    wpa-psk YOUR_KEY_HERE

replace wlan0 with your wireless interface name, which you can get by typing 'ifconfig -a' into a konsole. You will need root (or sudo) access to get the 'ifconfig -a' command to output anything.