Skip to content

connection wpa-psk automatic on Debian (without gui)

  1. # 1. Installation of the needed package
  2. apt-get install wpasupplicant
  3. # 2. modify the file wpa_supplicant.conf (create if not exist in /etc/wpa_supplicant)
  4. ctrl_interface=/var/run/wpa_supplicant
  5. network={
  6.   ssid=“ssid_of_the_network”
  7.   key_mgmt=WPA-PSK
  8.   proto=WPA
  9.   pairwise=TKIP
  10.   psk=“my passphrase”
  11. }
  12. # if you want an other network
  13. network={
  14.   ssid=“ssid_of_an_other_network”
  15.   key_mgmt=NONE
  16. }
  17. # 3. modify /etc/network/interfaces
  18. auto myinterface
  19. iface myinterface inet dhcp
  20.   wpa-drivers wext # you can get the list of drivers with the command wpa_supplicant
  21.   wpa-conf /path_of_wpa_supplicant.conf
  22. # 4. We can run
  23. ifdown myinterface && ifup myinterface