> For the complete documentation index, see [llms.txt](https://jotter.gitbook.io/red-team/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jotter.gitbook.io/red-team/wireless/cli-authentication.md).

# CLI Authentication

`nmtui` is a great tool to monitor local networks and connect via command line if necessary. If that isn't available, you may use `wpa_supplicant` with configuration files to connect to any type of SSID: WEP, WPA-PSK, or WPA-Enterprise.

```
# Use wpa_supplicant and dhclient to release/request DHCP
sudo wpa_supplicant -c wpa.conf -i wlan0
sudo dhclient wlan0 (-r)

# WEP Conf
network={
	ssid="HackTheBox"
    key_mgmt=NONE
    wep_key0=3C1C3A3BAB
    wep_tx_keyidx=0
}

# WPA PSK Conf
network={
	ssid="HackMe"
    psk="password123"
}

# WPA Enterprise Conf
network={
  ssid="HTB-Corp"
  key_mgmt=WPA-EAP
  identity="HTB\Administrator"
  password="Admin@123"
}
```
