Skip to content

Instantly share code, notes, and snippets.

@zhanglongqi
Last active June 12, 2023 10:44
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zhanglongqi/f05f569182910c49ae4375ed61ea12f8 to your computer and use it in GitHub Desktop.
Save zhanglongqi/f05f569182910c49ae4375ed61ea12f8 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
}
@zhanglongqi
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment