We just Launched UniFi Backup Explorer

UniFi SSH Commands: The Ultimate Guide

Published onNovember 20, 2023

SSH (Secure Shell) is a network protocol that provides a secure method for accessing network devices over an unsecured network. It's widely used for managing systems and applications remotely and a key tool for any network administrator working with UniFi devices.

Here are some crucial SSH commands and their applications to simplify your UniFi management tasks.

Let's dive in!

Table of Contents

How to connect by SSH

First of all it's important to know how to connect by SSH. This differs between adopted and non-adopted devices. Here is how that looks like:

For Adopted Devices

  1. Ensure that you are on the same local network as the UniFi device or console.
  2. SSH must be enabled on the device. For UniFi Network devices (such as Access Points, Switches, etc.), SSH is enabled by default. The credentials are a random string of characters which you can view and configure by going to UniFi Network > Settings > Advanced > Device Authentication.

  3. Use a command-line interface (CLI) to establish the SSH connection. The command format is ssh <username>@<ip-address>. For UniFi Consoles (like UDM Pro, Cloud Key), use root as the username. Example: ssh [email protected].

For Non-Adopted Devices

  1. Ensure you are on the same local network.
  2. Before setup or adoption, UniFi devices have default credentials. For UniFi Consoles and Gateways, the default username is either root/ubnt or root/ui. For UniFi Devices, it's ubnt/ubnt or ui/ui.

  3. Use the command ssh <username>@<ip-address> to connect, where <username> is either ubnt or ui, depending on the device.

Key UniFi SSH Commands

Now lets dive in the most frequently used commands. To get started open your Terminal.

UniFi SSH Commands

UniFi SSH Commands

  1. set-inform

    • Usage: set-inform <http://ip-of-host:8080/inform>
    • Purpose: Directs a UniFi device to a specific UniFi Controller, crucial for device adoption in different network setups.
  2. info

    • Usage: info
    • Purpose: Displays detailed information about the device, including firmware version, model, and IP address.
  3. set-default

    • Usage: set-default
    • Purpose: Resets the UniFi device to its factory default settings. Useful when repurposing or decommissioning devices.
  4. help

    • Usage: help
    • Purpose: Lists all available SSH commands and a brief description of their functions, aiding in troubleshooting and configuration.
  5. upgrade

    • Usage: upgrade <https://link-to-firmware>
    • Purpose: Manually updates the firmware of a UniFi device, used in scenarios where automatic updates are not feasible.
  6. fwupgrade

    • Usage: fwupgrade
    • Purpose: Initiates the firmware upgrade process on a UniFi device using a previously downloaded firmware file.
  7. reboot

    • Usage: reboot
    • Purpose: Remotely reboots the UniFi device, often used after configuration changes or updates to ensure proper application.

Final Thoughts

Making changes via SSH can affect network performance and, if done incorrectly, can lead to significant issues. It's recommended only for those who are comfortable with command-line interfaces and understand the implications of their actions on the network.

At UniHosted, we understand the complexities of managing UniFi Controllers and the devices connected to them. Our cloud-based UniFi Controller hosting simplifies the management process, offering a reliable and secure platform for your network.

Fee free to check out how we can take your networks to the next level here

We host UniFi Controllers in the Cloud

Are you ready to take your UniFi Network to the next level? Deploy a UniFi Cloud Controller in minutes and manage your network from anywhere.

Deploy Now

Free tier available

Get the best support

Join 491+ customers

No credit card required