Wifi

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m (Created page with '== Connecting to a WiFi network from the Linux command line == === WEP === <source lang="bash"> iwconfig wlan0 essid SSID key s:KEY </source> === WPA/WPA2 === To come... === Gene…')
 
m
 
(5 intermediate revisions by one user not shown)
Line 1: Line 1:
== Connecting to a WiFi network from the Linux command line ==
+
NetworkManager tends to get in the way... big time. Don't forget to kill him.
=== WEP ===
+
 
 +
==WEP==
 
<source lang="bash">
 
<source lang="bash">
iwconfig wlan0 essid SSID key s:KEY
+
stop network-manager
 +
ifconfig wlan0 down
 +
iwconfig wlan0 essid my_network
 +
iwconfig wlan0 key s:my_passphrase
 +
iwconfig wlan0 mode managed
 +
ifconfig wlan0 up
 +
dhclient -v wlan0
 
</source>
 
</source>
=== WPA/WPA2 ===
+
 
To come...
+
Alternatively you can specify the hex value for the key:
=== Generic ===
+
 
<source lang="bash">
 
<source lang="bash">
ifconfig wlan0 up
+
iwconfig wlan0 key ...
 +
</source>
 +
 
 +
==WPA2==
 +
This is untested, but something like this might work:
 +
<source lang="bash">
 +
stop network-manager
 +
ifconfig wlan0 down
 +
iwconfig wlan0 essid my_network
 +
wpa_passphrase my_network my_passphrase > wpa_supp.conf
 +
killall wpa_supplicant
 +
wpa_supplicant -B -Dwext -iwlan0 -cwpa_supp.conf
 
dhclient wlan0
 
dhclient wlan0
 
</source>
 
</source>

Latest revision as of 12:57, 20 March 2012

NetworkManager tends to get in the way... big time. Don't forget to kill him.

[edit] WEP

stop network-manager
ifconfig wlan0 down
iwconfig wlan0 essid my_network
iwconfig wlan0 key s:my_passphrase
iwconfig wlan0 mode managed
ifconfig wlan0 up
dhclient -v wlan0

Alternatively you can specify the hex value for the key:

iwconfig wlan0 key ...

[edit] WPA2

This is untested, but something like this might work:

stop network-manager
ifconfig wlan0 down
iwconfig wlan0 essid my_network
wpa_passphrase my_network my_passphrase > wpa_supp.conf
killall wpa_supplicant
wpa_supplicant -B -Dwext -iwlan0 -cwpa_supp.conf
dhclient wlan0
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox