Kali linux wpa_supplicant cli config

Kali linux wpa_supplicant cli config

Kali linux wpa_supplicant cli config.
first, bring up your network interface


ifconfig wlan0 up

next, we create a config file


wpa_passphrase 'router_ssid' 'wifi_password' > /etc/wpa_supplicant.conf

we need to edit the config file and remove some things


vim /etc/wpa_supplicant.conf

change the config file so that it contains:


network={
    ssid="router_ssid"
    #psk="wifi_password"
    psk=long_hex_string_goes_here
}

finally, we can auth with our router and obtain an ip address


sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
sudo dhclient wlan0