Connect to hidden Wifi AP with wpa-supplicant?

12,163

Solution 1

Finally, I've found out a solution, just an other line (previous not needed: wpa-ap-scan)

wpa-scan-ssid 1

I've not really found it in any documentation... just in a forum post.

Solution 2

I've not found official documentation about the /etc/network/interfaces config.

You can find the documentation at /usr/share/doc/wpasupplicant/README.Debian.gz. Under Chapter 4: Troubleshooting there's a section titled Hidden ssids:

In order to be able to associate to hidden ssids, please try to set the option 'ap_scan=1' in the global section, and 'scan_ssid=1' in your network block section of your wpa_supplicant.conf file. If you are using the managed mode, you can do so by these stanzas:

iface eth1 inet dhcp
    wpa-ap-scan 1
    wpa-scan-ssid 1
    # ... additional options for your setup
Share:
12,163

Related videos on Youtube

antivirtel
Author by

antivirtel

I'm working as Senior DevOps Engineer for Sky UK. I've recently been certified by RedHat: Red Hat Certified Specialist in Advanced Automation: Ansible Best Practices (Red Hat Ansible Tower 3.5 Ansible 2.8). I'm interested in Linux, and other free OS/software. I like: building complex systems, servers, bash scripts; watching films, driving.

Updated on September 18, 2022

Comments

  • antivirtel
    antivirtel over 1 year

    I have a headless Debian machine, with a Wifi dongle connected. I used to hide the Wifi AP, but now I can't.

    If I unhide it, some lines in the /etc/network/interfaces will allow me to connect:

    auto wlan0
    iface wlan0 inet dhcp
            wpa-ssid <name>
            wpa-psk <hex/raw pwd>
    

    If I hide the AP, add this line, then restart the interface, it won't work (DHCP gets no IP):

    wpa-ap-scan 2
    

    I've not found official documentation about the /etc/network/interfaces config.

    What can I do now?

  • Matt Joiner
    Matt Joiner over 10 years
    I found this by guessing too, I used wpa-scan_ssid 1. Also works.