Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Connecting a Raspberry Pi to WPA2 Enterprise Wireless Network
network={
ssid="ssid"
scan_ssid=1
key_mgmt=WPA-EAP
group=CCMP TKIP
eap=PEAP
identity="username"
password=hash:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
phase1="peapver=0"
phase2="MSCHAPV2"
}
@davidhoness

This comment has been minimized.

Copy link
Owner Author

@davidhoness davidhoness commented Nov 19, 2018

Tested on Raspbian Stretch.

Never store your password as plain text on a Raspberry Pi file system. Generate a password hash

echo -n password_in_plaintext | iconv -t utf16le | openssl md4

Take the 32 character long code and replace the X's in the password line of the template wpa_supplicant.conf
Also update the ssid and identity fields with the correct information.

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Ctrl - O followed by Enter to save, and Ctrl - X to quit from nano
Apply the config and the Raspberry Pi should connect after a moment

wpa_cli -i wlan0 reconfigure

Clear the command line history to remove a record of your password being typed into the terminal

history -c
rm ~/.bash_history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment