Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ksinkar/bad6b9c2c152abff27a2fe1fc13f3201 to your computer and use it in GitHub Desktop.
Save ksinkar/bad6b9c2c152abff27a2fe1fc13f3201 to your computer and use it in GitHub Desktop.
Connect to WPA2 Personal with hidden SSID using command line on Linux

This command will add your network parameters to the configuration file of wpa_supplicant

sudo -s
wpa_passphrase YOUR_SSID YOUR_PASSWORD >> /etc/wpa_supplicant/wpa_supplicant.conf

If the SSID of the network is hidden additional step need to be done:

sudo vim /etc/wpa_supplicant/wpa_supplicant.conf

Update what you just added scan_ssid=1 in your network parameters, such as from

network={
	ssid="YOUR_SSID"
	#psk="YOUR_PASSWORD"
	psk=YOUR_PREKEY
}

to

network={
	ssid="YOUR_SSID"
	scan_ssid=1
	#psk="YOUR_PASSWORD"
	psk=YOUR_PREKEY
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment