I've seen how one can connect to a hidden wifi network using the following:
nmcli c add type wifi con-name $ssid ifname $adapter ssid $ssid nmcli con modify $ssid wifi-sec.key-mgmt wpa-psk nmcli con modify $ssid wifi-sec.psk $password nmcli con up $ssid
In the code above the connection name is being set the same name as the SSID just for clarity.
However, this requires me to know the type of wifi authentication.
When connecting to a AP broadcasting it's SSID it appears that Network Manager can figure out what type of authentication is being used thus I only need to provide the password using something like this:
nmcli -w 30 device wifi connect $ssid password $password ifname $adapter
Is there a way to connect to a hidden wifi AP using
nmcl such that I only need to provide the password, SSID and device and not the type of authentication used similar to how connecting to a non-hidden AP doesn't require me to specify authentication type?