Ubuntu – How to Detect Security Mode of Wifi Access Point? (WEP/WPA/WPA2)


How can I find out what type of security a wireless access point (essid) is using? wep/wpa/wpa2 (preferably using commandline tools)

Best Answer

You can use the iwlist tool to print out all details of access points nearby. Assuming your wireless device is called wlan0:

sudo iwlist wlan0 scan

The output from iwlist will show each 'Cell' (or access point) that it finds, including the following details about the encryption type:

                    IE: IEEE 802.11i/WPA2 Version 1
                    Group Cipher : TKIP
                    Pairwise Ciphers (2) : CCMP TKIP
                    Authentication Suites (1) : PSK

This indicates that a network near me is using WPA2, using a pre-shared key (PSK).