terça-feira, maio 10, 2016

How To : Use wpa_cli To Connect To A Wireless Network using terminal manually

How To : Use wpa_cli To Connect To A Wireless Network – The Rantings and Ravings of a Madman





debian wpa_cli how-to



To connect manually, you need to first start up wpa_cli. This assumes that wpa_supplicant is already running, which it should be in most cases. If it’s not, you will see an error when you start wpa_cli.
Otherwise, once you’re in wpa_cli, it will show a prompt similar to this

Selected interface 'wlan0'
Interactive mode
>
Using the scan and scan_results command, you can scan for the networks and see some basic information

> scan
OK
<2>CTRL-EVENT-SCAN-RESULTS
> scan_results
bssid / frequency / signal level / flags / ssid
00:55:ab:25:ac:5a 2462 -71 [WPA2-PSK-CCMP][ESS] WLAN-Network
00:11:99:51:ba:f0 2437 -64 [WPA2-PSK-CCMP][ESS] WLAN-Network2
>
In the above scan results, you can see the 2 networks that the computer can pick up, the frequencies / channel that they are broadcasting on, the signal strength, the security type, and network name. Both of these networks are using WPA2 with a Pre-Shared Key.
To connect to one of them, we need to first create a network.

> add_network

This will output a number, which is the network ID.

> add_network
0
This will create an empty network ready for us to configure it.
Next up, we need to set the SSID and PSK for the network.

> set_network 0 ssid "WLAN-Network"
> set_network 0 psk "SupahSecretPassphrase"
> enable_network 0

Nenhum comentário: