use*_*ser 7 linux wifi wpa-supplicant debian
如何从命令行在主机上确认无线网络连接使用 WPA2?
无线路由器设置为WPA2 Personal
在网络上使用(带有预共享密钥的 WPA2)和 AES,我已将wpa-ssid
,wpa-psk
和添加wpa-proto RSN
到 /etc/network/interfaces,但 iwconfig 打印Encryption key:off
. 我正在运行 Debian Wheezy/7.0。我检查了系统日志,但没有看到任何相关信息,我系统上唯一当前的wpa_supplicant.conf是 D-Bus 的一个。
您可以通过执行此操作来检查接入点在其信标中广播的内容(您将需要该wireless-tools
软件包):
$ sudo iwlist wlan0 scanning
Run Code Online (Sandbox Code Playgroud)
输出因设备而异,并将显示界面可以看到的每个 SSID。我WPA2接入点给出了这样的(从iwlist
的非常详细的输出):
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : TKIP
Pairwise Ciphers (2) : CCMP TKIP
Authentication Suites (1) : PSK
Run Code Online (Sandbox Code Playgroud)
您也可以wpa_supplicant
直接询问,这可能更符合您的要求:
$ sudo wpa_cli status
Selected interface 'wlan0'
bssid=c8:d7:19:01:02:03
ssid=whatever-SSID-you-are-using
id=0
mode=station
pairwise_cipher=CCMP
group_cipher=TKIP <-- cipher
key_mgmt=WPA2-PSK <-- key mode
wpa_state=COMPLETED
ip_address=10.20.30.4
address=88:53:2e:01:02:03
Run Code Online (Sandbox Code Playgroud)