无法通过 wpa_supplicant 连接到 wifi

无法通过 wpa_supplicant 连接到 wifi

我在不同的论坛上搜索过如何使用终端连接到 wpa 网络,但似乎都不起作用

在网络管理器文件“/etc/NetworkManager/system-connections/elhackerderivendel”中我有:

[connection]
id=elhackerderivendel
uuid=2ec1e3d4-31ea-4d08-9aa4-6afc82324186
type=802-11-wireless
timestamp=1322936420

[802-11-wireless]
ssid=elhackerderivendel
mode=infrastructure
mac-address=ac:81:12:bb:28:e
security=802-11-wireless-security

[802-11-wireless-security]
key-mgmt=wpa-psk
psk=AAAAAAAAAAAAAAAA #this is not my real password as you can expect

[ipv4]
method=auto

[ipv6]
method=auto

另一方面,iwconfig 告诉我

- Device: wlan0  [elhackerderivendel] ------------------------------------------
  Type:              802.11 WiFi
  Driver:            brcmsmac
  State:             connected
  Default:           yes
  HW Address:        AC:81:12:BB:28:0E

  Capabilities:
    Speed:           28 Mb/s

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

并 sudo wpa_cli scan_results

Selected interface 'wlan0'
bssid / frequency / signal level / flags / ssid
00:0e:2e:c2:11:00   2462    188 [WPA2-PSK-CCMP-preauth][ESS]    elhackerderivendel
00:0b:3b:cc:95:e4   2427    177 [WPA2-PSK-CCMP][WPS][ESS]   elhackerderivendel

知道在 wpa_supplicant.conf 中该写什么吗?

答案1

man wpa_supplicant.conf 

会给你答案。无论如何,答案如下:

 ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
      #
      # home network; allow all valid ciphers
      network={
           ssid="home"
           scan_ssid=1
           key_mgmt=WPA-PSK
           psk="very secret passphrase"
      }
      #

相关内容