ネットワーク管理者隠しネットワークへの接続 - パスワードの指定 - 認証タイプではありません

ネットワーク管理者隠しネットワークへの接続 - パスワードの指定 - 認証タイプではありません

次のコマンドを使用して、隠しWi-Fiネットワークに接続する方法を見つけました。

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

上記のコードでは、わかりやすくするために、接続名がSSIDと同じ名前に設定されています。

ただし、これにはWi-Fi認証の種類を知る必要があります。

SSIDをブロードキャストするAPに接続すると、ネットワーク管理者はどのタイプの認証が使用されているかを把握できるように見えるため、次のようにパスワードを入力できます。

nmcli -w 30 device wifi connect $ssid password $password ifname $adapter

nmcl認証タイプを指定する必要のない隠しAPに接続するのと同様に、パスワード、SSID、およびデバイスのみを提供し、認証タイプを指定する必要がないように隠しWi-Fi APに接続する方法はありますか?

ベストアンサー1

nmcliと一緒に使用する場合は、オプションをに設定してみdevice wifi connectてください。hiddenyes

マニュアルからの抜粋[1]:

wifi connect (B)SSID [password password] [wep-key-type {key | phrase}] [ifname ifname] [bssid BSSID] [name name] [private {yes | no}] [hidden {yes | no}]
  Connect to a Wi-Fi network specified by SSID or BSSID. The command finds a matching connection or creates one and then activates it on a device. This is a
  command-line counterpart of clicking an SSID in a GUI client. If a connection for the network already exists, it is possible to bring up (activate) the existing
  profile as follows: nmcli con up id name. Note that only open, WEP and WPA-PSK networks are supported if no previous connection exists. It is also assumed that
  IP configuration is obtained via DHCP.

  If --wait option is not specified, the default timeout will be 90 seconds.

  Available options are:

  [...]

  hidden
    set to yes when connecting for the first time to an AP not broadcasting its SSID. Otherwise, the SSID would not be found and the connection attempt would
    fail.


  [1]: https://developer.gnome.org/NetworkManager/stable/nmcli.html

おすすめ記事