SSH into the UniFi. Note that the UniFi username and password get updated from the controller. Refer to here to find username and password.
ssh ubnt@192.168.1.20
run the syswrapper.sh script with the restore-default option.
syswrapper.sh restore-default &
set-default &
Note that this changed. Used to, you could just run syswrapper.sh restore-default
and it would reset. Now if you do that, it won’t reset, you’ll be able to ping the device, but you can’t ssh into it meaning you will need to physically reboot it.
Once the device is reset, log in over ssh and reconfigure.
Note that the username and password will now be ubnt/ubnt