Connecting to a wireless network which uses wpa-psk encryption using Backtrack distro
PROBLEM
-------
I was having a problem setting up wpa_supplicant on backtrack4.
My wireless point uses wpa-psk.
In /etc/network/interfaces:
<pre><code>
root@bt:/usr/bin# cat /etc/network/interfaces
auto lo
iface lo inet loopback
#auto eth0
#iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
pre-up wpa_supplicant -B -Dwext -i eth1 -c /etc/wpa_supplicant/wpa_supplicant.conf # you might change these bold parameters to suit your wireless card and interface.
post-down killall -q wpa_supplicant
#auto eth2
#iface eth2 inet dhcp
#
#auto ath0
#iface ath0 inet dhcp
#
#auto wlan0
#iface wlan0 inet dhcp
</code></pre>
Everything I read said to use wpa_passphrase like below, and delete the commented lines:
<pre><code>
root@bt:/usr/bin# wpa_passphrase My_ssid My_ssid_key
network={
ssid="My_ssid"
psk=e8a2c6fb04c3537ec1ea7c027b78f96fba46bc5497503dfe0aa2510844e82ce9
}
</code></pre>
however this failed miserably with my setup.
Ideas?
UPDATE - 2011.04.18 23:58
--------------------------
What was needed was a conf file like below:
<pre><code>
root@bt:/usr/bin# cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
# ap_scan=2 was the one for me you may try 0 or 1 indstead of 2
ap_scan=2
fast_reauth=1
network={
ssid="My_ssid"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="My_ssid_key"
}
</code></pre>
UPDATE2
-------
For posterity:
WPA-PSK
<pre><code>
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
# ap_scan=2 was the one for me you may try 0 or 1 indstead of 2
ap_scan=2
fast_reauth=1
network={
ssid="my_network"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
psk="secret_password"
}
</code></pre>
For WPA2-Personal
<pre><code>
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="my_network"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
psk="secret_password"
}
</code></pre>