How to connect to wireless SSID without password?

Checkout section labeled Open Networks

You could also edit /etc/rc.conf and remove WPA from ifconfig line.
ifconfig_wlan0="DHCP"

A third option is to use a connection manager like net-mgmt/networkmgr

Please be advised that this is a security issue not using any wireless encryption.
You are at the mercy of the host network.
 
And anyone sniffing it. I wouldn't log into anywhere that needed a password.
That's one of the reasons why those secure VPN services are so popular. Apart from having to trust that VPN provider, it's a good idea to use some form of VPN on these 'dodgy' open wireless networks. If you don't trust any of the commercial VPN providers you could setup your own VPN service on a hosted server and use that to protect your data from any prying eyes.
 
Thanks Phishfry!

sysrc ifconfig_wlan0="SYNCDHCP" will add a code line?

What is the difference between "DHCP" and "SYNCDHCP"?
 
What is the difference between "DHCP" and "SYNCDHCP"?

sysrc ifconfig_wlan0="SYNCDHCP" will add a code line?
Yes but use the append option for sysrc(8)
sysrc ifconfig_wlan0+="SYNCDHCP"
This makes sure that there is only one instance of ifconfig_wlan and appends the variable.
 
Thanks following up, if two line code conflict, I guess system will choose the final ifconfig code at the bottom.
 
In my setting I only use ="DHCP".
I use Xorg with my laptops and the delay of bringing up Xfce gives enough time for the interface to get a lease.
If working from only the command line I could see the use of ="SYNCDHCP".
Xfce loading gives enough delay for my network, I would prefer a speedy startup instead of waiting for the DHCP lease then starting Xfce.
So it depends on your personal preferences and use pattern.
 
Then I use sysrc ifconfig_wlan0+="DHCP" for a fast startup at Starbucks and Airport.

At home I have two wireless routers two WPA protected SSID,
Do you have any quick switch command between different WPA SSIDs , switch from "WPA network A" to "WPA network B"
 
Swtich between WPA SSIDs I will try this
Create a second file : wpa_supplicant2.conf
wpa_supplicant -Dbsd -iwlan0 -c/etc/wpa_supplicant2.conf

that will show associated but can not connect why?
 
network={
ssid="wifi_name1"
psk="wifi_key1"
}



and

network={
ssid="wifi_name2"
psk="wifi_key2"
}



wpa_supplicant -B -i wlan0 -c <(wpa_passphrase MYSSID passphrase)
 
Instead of using multiple wpa_supplicant.conf files you add all your networks to the one file:

Code:
network={
ssid="HOME1"
scan_ssid=1
psk="HOME1_PASS"
key_mgmt=WPA-PSK
}


network={
ssid="HOME2"
scan_ssid=1
psk="HOME2_PASSWORD"
key_mgmt=WPA-PSK
}

network={
        ssid="STARBUCKS"
        scan_ssid=1
        key_mgmt=NONE
}

Then you can use wpa_cli to switch between networks.
wpa_cli list_networks
wpa_cli -i wlan0 select_network 2
 
wpa_supplicant -Dbsd -iwlan0 -c/etc/wpa_supplicant.conf

Which position should I put -s and -f option ? I want to see the debug file or syslog

-s = log output to syslog instead of stdout
-f Log output to debug file instead of stdout.
 
wpa_cli list_networks
Failed to connect to non-global ctrl_ifname: (nil) error: No error: 0
Try it with the interface:
wpa_cli -i wlan0 list_networks
It will give you a numbered list of networks from your /etc/wpa_supplicant.conf.
Use the number of your desired netwok with select_network directive.
 
Back
Top