I will give an example of resetting the Ubiquiti (UBNT) settings of devices via SSH:
cfgmtd -w -f /etc/default.cfg reboot
You can also reset the settings by pressing and holding the RESET button on the device or the POE power supply for 10–20 seconds, when the lights turn on in a different color or start flashing, you can release the button. This button will work if it has not been previously disabled in the settings, in the configuration it looks like this:
If the POE power supply unit does not have a RESET button, and there is no physical access to the device, you can energize the blue wire, for example, close it with white-green (4 and 3), that is, without breaking these wires, expose them to close the running device, it will also reset the settings.
After resetting, the standard IP address of the device is 192.168.1.20, the login is ubnt and the password is ubnt.
See also my article:
Ubiquiti SSH control