In /etc/wpa_supplicant.conf:
network={
ssid=”yourSSID”
proto=WPA
key_mgmt=WPA-PSK
psk=”yourPASSWORD”
}
Run as root:
wpa_supplicant -i wlan0 -c/etc/wpa_supplicant.conf
pause 7-10 sec
dhclient wlan0
For running on boot, edit the file /etc/rc.local:
# Wireless
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -B
sleep 7
dhclient -nw wlan0