UniFi: How to SSH into an AP or Switch

UniFi: How to SSH into an AP or Switch
Contents

There may be times when problems arise with your Unifi devices, It could be because the power blinked and sent the firmware out of whack, or an upgrade that went awry. In any case, using SSH to control your device is considered to be an advanced procedure. While it may be the only option if the device is in trouble, it is not recommended. Novice users may be overwhelmed and should consider hiring a professional or contacting Hubox support. . .

If you choose to proceed, do so cautiously, and follow whatever instructions you are using carefully. This page is only intended to get you logged in via port 22 (the standard SSH port)

Prerequisites:

An SSH client:


Windows users will be using PuTTY
Linux and Mac users can enjoy the convenience of their built in Terminal client, nothing to download.

Network connectivity:

You must have direct access to the device on your network, be that on the same broadcast domain, or routed between VLANs.
You will obviously need the IP of the device. This can be obtained from your DHCP server, or via your Hubox controller GUI.
If you have to directly connect to the device with a cable, your only option is to manually set a static IP on your computer's interface. If the device you need to access is defaulted, it will be using it's fallback IP of 192.168.1.20. So, set your interface manually to a static IP of anything but 192.168.1.20, and somewhere in the /24 subnet (192.168.1.1 - 192.168.1.254)

The credentials of the device:

Username and password for factory defaulted devices are as follows. . .

Unifi APs and switches: ubnt/ubnt
Unifi gateways: root/ubnt


Devices adopted by your Hubox controller will have the credentials noted in System --> Application Configuration --> Device SSH Authentication (this location will vary with your controller version, example here is based on point release 6.5.55). 'Advanced Features' must be enabled first. . .

Now you can proceed. SSH into the device like so (change username and IP as necessary):

ssh [email protected]

After logging in, type 'info' or 'help' for information on the status of the device and suggested commands. Proceed with whatever tutorial you are following. Once again, a reminder to be careful.

Any changes you make will be overridden by your Hubox controller once adopted and provisioned again. SSH is for rescue and diagnostic operations only.