I will put here the ssh commands for Ubiquiti WiFi AP that I use.
If you don't know how to get the IP Address of your APs, you can use the Ubiquiti Device Discovery tool to find it.
user@host:~$ ssh -l ubnt 192.168.1.20
I will show here how to get or set the ssh password for a Network Management Controller registered device.
To be able to download the latest firmware, it can be useful to know how to set networks parameters.
UBNT-BZ.v4.3.21# ip addr add 192.168.1.143/24 dev br0
UBNT-BZ.v4.3.21# ip route del default
UBNT-BZ.v4.3.21# ip route add default via 192.168.1.254
UBNT-BZ.v4.3.21# echo "nameserver 192.168.1.254" > /etc/resolv.conf
If we want to upgrade firmware from ssh, first go to https://www.ui.com/download/ webpage. And get your firmware device URL.
UBNT-BZ.v4.3.20# upgrade https://dl.ui.com/unifi/firmware/BZ2/126.96.36.19925/BZ.ar7240.v188.8.131.5225.200922.1739.bin
Downloading firmware from 'https://dl.ui.com/unifi/firmware/BZ2/184.108.40.20625/BZ.ar7240.v220.127.116.1125.200922.1739.bin'. Scheduling firmware upgrade... Waiting for upgrade to start...
UBNT-BZ.v4.3.21# syswrapper.sh restore-default
UniFi# set-inform http://your.unifi.controller:8080/inform