工作と競馬2

電子工作、プログラミング、木工といった工作の記録記事、競馬に関する考察記事を掲載するブログ

Passwords or encryption keys are required to access the wireless network 'ssid名'と出て、Wi-Fiに接続できないとき

背景

接続先のWi-Fiルータ機種によっては、

nmcli c up 接続名

をやったときに、

Passwords or encryption keys are required to access the wireless network '<SSID名>'.
Warning: password for '802-11-wireless-security.psk' not given in 'passwd-file' and nmcli cannot ask without '--ask' option.
Error: Connection activation failed.

と出てしまって接続できないことがあった。


原因

パスワードを

nmcli c mod 接続名 802-11-wireless-security.psk **********

と直接設定しているせいで出ている。


解決方法

developer-old.gnome.org

こちらにある通り、以下のようにpskをファイルに記載し、

802-11-wireless-security.psk:**********

nmcli c upのときにそのファイルを読み込むようにする。

nmcli c up 接続名 passwd-file ファイル名

これで、接続できなかったアクセスポイントに無事接続できるようになった。