Connecting to a free WiFi without using a GUI

I don’t tend to use a graphical network manager these days and find it simpler to just configure my wireless connection ‘manually’ by modifying the configuration files as my network configuration is a little complicated.

Since I’m usually at home, tethered to my phone, or using a friend’s access point this just involves updating the configuration file to change the SSID and PSK (Pre Shaired Key) and restarting the network which isn’t too difficult.

Recently however when on holiday I needed to connect to a Wireless Access Point that was configured without a password, so naturally I set up the SSID and left the password blank.

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

/etc/wpa_supplicant/wpa_supplicant.conf
network={
    scan_ssid=1
    ssid="Free WiFi"
    psk=""
}

Of course this didn’t work, if it had I wouldn’t need to write this post.

At this point I was a bit stuck as one of the reasons I’d picked this particular location for a holiday was that there was no mobile signal, so I couldn’t use my phone to access the internet. Fortunately, I remembered that some packages include examples of their configuration files.

Time for a quick search.

sudo find / -iname wpa_supplicant.conf
/etc/dbus-1/system.d/wpa_supplicant.conf
/etc/wpa_supplicant/wpa_supplicant.conf
/usr/share/doc/wpasupplicant/examples/wpa_supplicant.conf

After scrolling through the contents of the example file for quite a while I spotted the suggested configuration for a ‘plaintext connection’ and modified my configuration accordingly.

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

/etc/wpa_supplicant/wpa_supplicant.conf
network={
    scan_ssid=1
    ssid="Free WiFi"
    key_mgmt=NONE
}

Success!!!

This entry was posted in Debian, Linux, Networking, Raspbian and tagged . Bookmark the permalink.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.