Login to your pi’s terminal, and run the following two commands.
sudo su wpa_passphrase YOUR_SSID
You’ll then be asked to enter the passphrase and confirm the passphrase. If they match; you’ll see a blurb that’s a config file fragment.
Now (still as
su) repeat the last step, but pipe-append the output to the supplicant file.
wpa_passphrase YOUR_SSID >> /etc/wpa_supplicant/wpa_supplicant.conf
You won’t see the instructions this time - but that’s okay. There are just two things left to do;
- remove the plain text password from the supplicant file
scan_ssid=1so that it can find the network when it’s hidden
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Finally; reboot and run something like
sudo apt-get update to test it all.
I have no idea why the guides for this take four pages.