UniFi SSH Commands: The Ultimate Guide
Published onby Iron (edited on )
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
- Ensure that you are on the same local network as the UniFi device or console.
-
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.
-
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), useroot
as the username. Example:ssh [email protected]
.
For Non-Adopted Devices
- Ensure you are on the same local network.
-
Before setup or adoption, UniFi devices have default credentials. For UniFi Consoles and Gateways, the default username is either
root/ubnt
orroot/ui
. For UniFi Devices, it'subnt/ubnt
orui/ui
. -
Use the command
ssh <username>@<ip-address>
to connect, where<username>
is eitherubnt
orui
, 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
-
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.
- Usage:
-
info
- Usage:
info
- Purpose: Displays detailed information about the device, including firmware version, model, and IP address.
- Usage:
-
set-default
- Usage:
set-default
- Purpose: Resets the UniFi device to its factory default settings. Useful when repurposing or decommissioning devices.
- Usage:
-
help
- Usage:
help
- Purpose: Lists all available SSH commands and a brief description of their functions, aiding in troubleshooting and configuration.
- Usage:
-
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.
- Usage:
-
fwupgrade
- Usage:
fwupgrade
- Purpose: Initiates the firmware upgrade process on a UniFi device using a previously downloaded firmware file.
- Usage:
-
reboot
- Usage:
reboot
- Purpose: Remotely reboots the UniFi device, often used after configuration changes or updates to ensure proper application.
- Usage:
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.
If you don't want the hassle of installing, updating and securing your network yourself, let us do it.
Feel free to give it a try. Additionally, I'm happy to personally walk you through. Just schedule a meeting using my calendar link.If you would like me to personally walk you through UniHosted, you can schedule a call with me 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.
Free tier available
Get the best support
Join 1660+ customers
No credit card required