Sunday 6 March 2011

Connecting to WPA networks

Wireless networks using WEP keys are not very secure. WPA keys should be preferred over WEP keys. To connect to a wireless network on linux, first store the passphrase in a configuration file with the following command:

wpa_passphrase "<your essid>" "<your passphrase>" > /etc/wpa_supplicant.conf

Set up WPA handshaking using

wpa_supplicant -Dwext -iwlan0 -B -c/etc/wpa_supplicant.conf

The option -Dwext specifies that generic linux wireless drivers should be used. The -B flag tells wpa_supplicant to work in the background. The -iwlan0 option specifies wlan0 as the interface for communication. Now set up dhcp client on wlan0 using

dhcpcd wlan0

No comments: