These instructions assume that the wireless network is up and running:

$ iwconfig

Then to check that your hardware can see the wireless network you wish to connect to:

$ sudo iwlist scan

To receive your WiFi Key:

$ wpa_passphrase YOURSSID YOURWIFIPASSWORD

An example of the resulting text:

network={

ssid="YOURSSID"

.#psk="YOURWIFIPASSWORD"

psk=fe727aa8b64ac9b3f54c72432da14faed933ea511ecab1 5bbc6c52e7522f709a

}

Copy the "psk" to the /etc/network/interfaces where it reads wpa-psk.