I'm trying to connect to a wpa wireless network via linux command line. As many of you know, this is needlessly complex.
I am using a BackTrack 5 CD with an Alfa networks USB wireless card. The interface is named wlan0.
After browsing around for several hours, it seems the best way to establish a connection is via the wpa_supplicant command. The problem is there are lots of different ways to write a config file, but no website explains how to actually build one.
One common method is to use the wpa_password command. This generally creates the following file.
Code:
network={
ssid="MyNetwork"
#psk="mypassword"
psk=000459ac030f03858e192349599ffa934
}
Most websites ask me to uncomment the plaintext password or to delete the hex password.
Many websites also tell me to include the following lines
Code:
ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
Although the ap_scan arguement can be a value between 0 and 2 depending on the website. It instructs me to pick the one that's appropriate for my card. Whatever that is.
the ctrl_interface is interesting because it always seems to reference /var/run/wpa_supplicant regardless of the website, but that file doesn't even exist on my machine.
Other information that is often included but never explained are the following lines.
Code:
scan_ssid=0
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
Anyway, regardless of the config file I use the result is always the same.
Code:
Trying to associate with <My MAC address> (SSID="mynetwork" freq=2462 MHz)
Authentication with <My MAC address> timed out.
Trying to associate with <My MAC address> (SSID="mynetwork" freq=2462 MHz)
Associated with <My MAC Address>
CTRL-EVENT-DISCONNECTED - Disconnect even - remove keys
WPS-AP-AVAILABLE
Then it repeats the last four lines until I ctrl+c.
A lot of websites also suggest editing startup scripts and rebooting the computer, but since this is a live disk, that won't work.
If anyone could explain any part of what I just talked about, I would be ecstatic.