# Auto-connect to hidden wifi

## lixo1

Dear all,

I'm using gentoo with kde, and after setting up a hidden network, 

every login, the automatic connection fails, the only way to connect 

is opening a root terminal and typing: 

```
iwconfig eth1 essid <hidden network name = Calc>
```

Do you know how can I avoid the hand step iwconfig?

Here my /etc/conf.d/net

```
#Generated by NetworkManager

###### Global Configuration ######

###### Connection Configuration ######

#----------------------------------

auto_Calc="true"

config_Calc=(

        "dhcp"

        "dhcp6"

)

enable_ipv6_Calc="true"

#----------------------------------

enable_ipv6_eth0="false"

auto_eth0="true"

config_eth0=( "dhcp" )

```

Thank you very much for any kind of help!

----------

## pigeon768

I don't know about NetworkManager -- is there an option for it in the GUI? Using nmcli is problematic at best. (which is why I don't use it)

If you used wpa_supplicant it would be something like this: 

```
network={

        ssid="ssid"

        key_mgmt=WPA-PSK

        psk="your_pre_shared_key"

        scan_ssid=1

}
```

 The scan_ssid= is the important bit.

Is there a specific reason you're hiding your SSID? It is not, contrary to popular belief, any more secure than broadcasting your SSID. If your organization forces hidden ssids on you, that's unfortunate, but don't do this to yourself on purpose.

Just make sure you're using WPA2 with AES and a strong PSK.

----------

## lixo1

Unfortunately it's the university wifi, which is not wpa, we do not need to provide any wifi password, when I get the connection you put your credentials on a browser webpage.

Do you have any other hint? The strange thing is that on kubuntu, after setting the hidden network, it connects automatically, and that is not true for gentoo.

----------

## Rexilion

The fact that this works on Kubuntu could relate to a firmware/kernel combination that doesn't seem to work.

Are you sure you explicitly added the network as a 'hidden' in NM under Gentoo?

----------

