I'm using kali linux and I want to connect to my hidden wifi

so I know my SSID name and the password, how can I connect to this wifi?

  • Since you're running Kali I assume you understand why hiding your SSID is a really bad idea. Jun 3, 2017 at 22:16
  • I have desktop and two smartphone, and my pc work with kali linux and windows 10, so I'm not alone
    – Sona
    Jun 4, 2017 at 3:54

2 Answers 2


Create a wpa_supplicant configuration file with the following content:

#nano /etc/wpa_supplicant/wpa_supplicant-Hidden.conf


Then connect:

wpa_supplicant -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant-Hidden.conf -B

Replace wlan0 with your wifi interface.

Step by step:

to create the wpa_supplicant-Hidden.conf file:

touch /etc/wpa_supplicant/wpa_supplicant-Hidden.conf 
wpa_passphrase "YOUR-HIDDEN-SSID" YOUR-PASSWORD > /etc/wpa_supplicant/wpa_supplicant-Hidden.conf 

Then edit your wpa_supplicant-Hidden.conf by adding the missing parametre as described bellow.

A sample script to connect:

killall wpa_supplicant
echo "starting wpa_supplicant"
wpa_supplicant -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant-Hidden.conf -B
echo "getting IP through dhcp"
dhclient wlan0
echo "ping test for 5 seconds"
ping -w 5

If you have Network-Manager installed the killall wpa_supplicant will kill the runing wpa_supplicantservice.

To get what is the SSID you are currently connect to , run the following:


sample output:


I am going to assume you are using the default kali desktop environment, gnome:

  1. Open the system menu from the right side of the top bar.
  2. Select Wi-Fi Not Connected. The Wi-Fi section of the menu will expand.
  3. Click Wi-Fi Settings.
  4. Click the Connect to Hidden Network… button.
  5. In the window that appears, select a previously-connected hidden network using the Connection drop-down list, or New for a new one.
  6. For a new connection, type the network name and choose the type of wireless security from the Wi-Fi security drop-down list.
  7. Enter the password or other security details.
  8. Click Connect.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .