Saturday, January 26, 2013

How to connection to wireless with WPA/WPA2 using commandline on linux

You have the following netowrk and wireless card

- SSID: mywpa2wifi
- Pass Phrase: topsecret
- your wireless nic is: wlan0



Generate wpa key combined with  its ssid

#wpa_passphrase  mywpa2wifi topsecret > /etc/wpa_supplicant/wpa_mywpa2wifi.conf

Connect to AP using the file we just created in  /etc/wpa_supplicant/



#wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_mywpa2wifi.conf



Note: you have to have wpa_supplicant install in order to is it. I notice that since i started using ubunt 10.04, the wpa_supplicant is shipped with the OS.

No comments:

Post a Comment