Skip to content

Instantly share code, notes, and snippets.

@Salamek
Last active October 30, 2025 15:34
Show Gist options
  • Select an option

  • Save Salamek/a29e2a4a95ee0c38151c3b7a0bbcf418 to your computer and use it in GitHub Desktop.

Select an option

Save Salamek/a29e2a4a95ee0c38151c3b7a0bbcf418 to your computer and use it in GitHub Desktop.
SSH Update of Ubiquity cameras

SSH Update of Ubiquiti cameras

When Ubiquiti camera is not updated for longer time (long storage etc.), its firmware becomes incompatible (too old) with latest version of Unifi Protect. This is HOWTO do update from modern Linux OS system (you may also use OS-X):

HW preparation

  1. Connect your camera to PoE switch or injector
  2. Reset your camera to factory settings using HW button (check official docs of your camera for location and combination)
  3. Connect your Linux running computer to same network as camera is
  4. Check your router client list for camera IP or Unify Protect camera list

SSH connection

Since these cameras can use way too old SSHd you will most likely need to force usage of old oKexAlgorithms and oHostKeyAlgorithms but first try:

# Password is ubnt
ssh ubnt@CAMERA_IP

If this fails do to incompatible alg. use:

# Password is ubnt
ssh ubnt@CAMERA_IP -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-rsa

Finding and downloading update file into your computer to get md5sum

  1. Check your camera FW version, it is displayed right after successful SSH login like this ubnt-V4.23.8
  2. Go to https://ui.com/download/software/uvc-g3-bullet and search for your device (This example uses GC-bullet), and copy next firmware version download URL (right click on download button-> copy link address) after your current firmware version. In our case it is v4.30.0 so our URL we want is https://dl.ubnt.com/firmwares/uvc/v4.30.0/UVC.S2L_4.30.0.bin
  3. Download firmware *.bin file from step 2. to your computer and calculate its md5:
wget https://dl.ubnt.com/firmwares/uvc/v4.30.0/UVC.S2L_4.30.0.bin
md5sum UVC.S2L_4.30.0.bin
> 12be87d4e7c8f352985f1d4b44e0e3e1  UVC.S2L_4.30.0.bin

As you can see md5 sum is 12be87d4e7c8f352985f1d4b44e0e3e1

Downloading update file into your camera

  1. In SSH shell of your camera run:
curl --output /tmp/fwupdate.bin https://dl.ubnt.com/firmwares/uvc/v4.30.0/UVC.S2L_4.30.0.bin -k
  1. Now generate md5sum
md5sum /tmp/fwupdate.bin
> 12be87d4e7c8f352985f1d4b44e0e3e1  /tmp/fwupdate.bin

Make SURE that htis md5 sum matches sum calculated before on file you have downloaded into your computer! If it does not match, stop here and repeat!

  1. After sucesfull check of md5 sum, run firmware update:
fwupdate -m

Camera will restart and start updating immediately.

After successful update you may try to check Unifi Protect if it is able to adop the camera or not. If not repeat the update process with next firmware version until is Unifi Protect able to adopt your camera. Updates needs to be incremental.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment