Raspbian wifi access with PEAP/MSCHAPv2

I wanted to connect to a wifi network secured with 802.1X (PEAP and MSCHAPv2) with the Raspberry Pi (Raspbian). However, it took me hours...

Here's what finally worked:
Assuming you use wpa_supplicant, edit or create /etc/wpa_supplicant/wpa_supplicant.conf. The essentials lie in lines 11 and 12.
# /etc/wpa_supplicant/wpa_supplicant.conf
network={
        ssid="my_hotspot"
        proto=WPA2
        key_mgmt=WPA-EAP
        pairwise=CCMP
        group=CCMP
        eap=PEAP
        identity="my_user"
        password="my_pass"
        phase1="peaplabel=0"
        phase2="auth=MSCHAPV2"
}
Buchcover