UniFi Switch: How to access the CLI & Config via SSH

UniFi Switch: How to access the CLI & Config via SSH

In this article, I will show you how to access a UniFi switch’s CLI interface and configuration. As you know, UniFi Switches are controlled and configured through the UniFi Controller. When you SSH to the switch you only get a linux shell prompt rather than a command line interface.

Here is how to connect to the UniFi switch CLI

  1. SSH to the switch & login.
    The credentials can be found in your UniFi controller’s settings.
  2. At the # prompt, telnet to
  3. At the (UBNT) > prompt type “enable
  4. Type “show run” to output the running configuration of the switch

Once you have reached the (UBNT) # prompt you are effectively configuring an EdgeSwitch, here is the EdgeSwitch CLI command reference.

If you want to backup the configuration file you can use one of the following commands.

To make changes to the switch configuration use the configure command to enter config mode. Here is an example of how to change the description for interface 0/1

Note: Configuration changes you make to the switch via the CLI will be overwritten by the UniFi controller when the switch is restarted.

One Reply to “UniFi Switch: How to access the CLI & Config via SSH”

  1. Thanks for this post. You helped me recover a switch when I accidentally put it on a vlan which was incompatible with its static IP config. logged in and ran a “no network mgmt_vlan” and it connected to unifi.

Leave a Reply

Your email address will not be published. Required fields are marked *