The only way I've found to connect to an Enterprise AP is to modify the wpa_supplicant.conf file, adding this:



Now, let's say I have the same router, SSID and pwd at home and at work: should I be able to connect to both of them with the same credential I use for one of them? (ie, if I modify wpa_supplicant.conf for the home-wifi, can I automatially connect to the work-wifi when I am there?)

If no, how can I differentiate the two, if all the parameter are the same? Thanks

1 Answer 1


From man wpa_supplicant.conf:

Configuration file can include one or more network blocks, e.g., one for each used SSID. wpa_supplicant will automatically select the best network based on the order of network blocks in the configuration file, network security level (WPA/WPA2 is preferred), and signal strength.

In other words, just add another network= block for each SSID you want to be able to potentially connect to. If they are in separate places, obviously the selection algorithm referred to above will not matter.

  • So my Raspberry and a particular SSID are not linked with a "key", which makes the connection unique? I just need to enter the SSID and password and if I find another network with the same informations, will it connect? My worry was that after one connection, that password and username were "stored" with a key of that particular AP making it unique.
    – Backup
    Commented Nov 10, 2018 at 21:36
  • I don't understand you. Does this have to do with switching SSID's when you are in an area where there is more than one listed in wpa_supplicant.conf? You can have as many as you like in there, but if they are in physically different areas there's no conflict. You should connect to whichever one is applicable. The "key" you are referring to is just a conceptualization of yours, correct?
    – goldilocks
    Commented Nov 11, 2018 at 13:55
  • I think what he's meaning is, let's say there are 2 networks with exactly the same credentials, in different locations. If you save the credentials on wpa_supplicant for one fo the networks (say, the first time you connect to the network at your home). would this be enough to connect to another network automatically which has the same SSID and password requirements? Commented Nov 12, 2018 at 11:41
  • Good question. My hunch is it will not know the difference. You can run wpa_supplicant in the foreground if you want some details about what's working and how (but you will probably need to disable auto-networking stuff first).
    – goldilocks
    Commented Nov 12, 2018 at 14:08
  • Sorry for the late reply. Yes, what @LecauseAndThePi says it's what I wanted to express. My main problem is also that I need to connect to that one AP from the terminal because it is grayed out in the GUI network panel. For this reason I need to modify the wpa_supplicant.conf file on the go.
    – Backup
    Commented Nov 15, 2018 at 15:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.