Orange County, Tustin, CA 92780

SSHing to a Ubiquiti Switch: A Step-by-Step Guide

SSHing to a Ubiquity Switch

Recently we were testing out a new RMM tool and were going through the discovery of devices on the network by using SNMP. As we came across an IP that was not getting automatically recognized or categorized properly, we realized it was a Ubiquiti USW-24-PoE switch. No problem with thought and quickly opened up a Putty session and attempted to connect providing the username and password we had in our documentation but it did not work. 

Did we have the wrong SSH credentials? During the UniFi device adoption, did we not establish credentials?

We had credentials for our UDM-Pro and could connect with no problem.

We quickly hopped on to our favorite search engine and searched "default Ubiquiti switch password". While tons of search results came back, some with plenty of screenshots and lists of default usernames and passwords for all devices.  Every single one came back telling us to use "ubnt" for both the username and password, but none worked. 

Finally, after what seemed like hours, we came across an article stating that if we had not explicitly set up a username and password during the adoption phase, both the username and password would be automatically generated for us.

We did the following:

  1. We logged into our controller and went to Settings
  2. Navigated to System
    Network Device SSH Authentication

  3. Scrolled down all the way to Network Device SSH Authentication
  4. Located the username and password

The little information icon reads when you hover over it, "Directly access your network devices through SSH authentication."

So it looks like any device adopted using the Unifi controller will have its SSH credentials automatically assigned. 

Just in case this changes, you can see from the second screenshot that the Unifi Network version is 7.2.95 and worked for us under this particular version. We were able to successfully establish an SSH session via Putty and update our SNMP community string so that it could be discovered properly with the RMM tool.

Happy SSHing.

Byron Zepeda

Byron Zepeda is a Senior Systems Engineer in Orange County, California, working with VMware vSphere, Citrix Virtual Apps, backups, and storage. As cloud technologies and automation become first-class citizens within IT organizations, he desires to share everything he learns and pass it on to others.