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 127.0.0.1
  3. At the (UBNT) > prompt type “enable
  4. Type “show run” to output the running configuration of the switch
BusyBox v1.19.4 (2017-07-12 21:42:26 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

US.v3.8.6# telnet 127.0.0.1

Entering character mode
Escape character is '^]'.

Warning!
The changes may break controller settings and only be effective until reboot.

(UBNT) >enable

(UBNT) #show run

!Current Configuration:
!
!System Description "USW-48P-500, 3.8.6.6650, Linux 3.6.5"
!System Software Version "3.8.6.6650"
!System Up Time          "61 days 16 hrs 24 mins 2 secs"
!Additional Packages     QOS,IPv6 Management
!
....

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.

# 
# Backup unifi switch config over FTP
(UBNT) # copy system:running-config ftp://user@192.168.1.20/unfi-switch.cfg

#
# Backup unifi switch config over TFTP
(UBNT) # copy system:running-config tftp://192.168.1.20/unfi-switch.cfg

#

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

(UBNT) #config

(UBNT) (Config)#interface  0/1

(UBNT) (Interface 0/1)#description "Port 1 Testing"

(UBNT) (Interface 0/1)#exit

(UBNT) (Config)#exit

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

pictory

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ads Blocker Image Powered by Code Help Pro

🙏🙏A Humble Request to Disable AdBlock 🙏🙏

You can close this message & continue reading but...
❤️❤️❤️ Please consider visiting one of my sponsors first ❤️❤️❤️

DigitalOcean 🚀

Sign up and get a $200, 60-day credit to try DO.
Spend $25 after your credit expires and I will also get $25 in credit!
DigitalOcean Referral Badge

Pictory 🤖

Create amazing videos using Pictorys AI powered software.
Its FREE to create your first 3 video projects
pictory


Hi Reader, I noticed that you are using an ad blocker while visiting my website. While I completely understand that excessive ads can hinder your browsing experience, ad revenue helps pay for the cost associated with operating this website.

jcutrer.com is a labor of love, created with the primary aim to provide you with quality content, free of cost. It’s a space where I share information, ideas, and insights that I hope have a meaningful impact. However, maintaining and updating this platform incurs substantial costs.

Sincerely,
Jonathan