SSH into UniFi APs, switches and consoles: how to connect
To SSH into a UniFi device, run ssh <username>@<device-ip> from a computer on the same local network. Access points and switches have SSH on by default. Consoles such as a Dream Machine or Cloud Key have it off until you enable it.
If you're not on the same network, use the Debug console in UniFi Network instead. Ubiquiti recommends it over SSH anyway.
| Device | SSH by default | Username after setup | Password after setup |
|---|---|---|---|
| Access points, switches | On | Random device SSH username | Random device SSH password |
| Consoles (UDM Pro, UNVR, Cloud Key) | Off | root |
The console's own SSH password, set in UniFi OS |
| Gateways without a console (UXG) | Not stated by Ubiquiti | root |
The shared device SSH password |
This comes from Ubiquiti's Connecting to UniFi with Debug Tools & SSH article, last edited in April 2026. The screenshots below were taken in May 2026 on a UCG Ultra and a U6+ access point, running UniFi Network 10.3.58.
Before you connect
Ubiquiti lists three requirements:
- Your computer is on the same local network as the device. A laptop on the same WiFi works, or a laptop wired directly to the device.
- SSH is enabled on the device. Devices and consoles have separate SSH settings.
- You have an SSH client. macOS and Linux have one built into the terminal. On Windows, use PowerShell or PuTTY.
Ubiquiti also says it doesn't recommend SSH unless one of its support engineers asks you to use it. A wrong command can take a device, or the whole network, offline.
SSH into a UniFi access point or switch
Access points and switches use the same steps. Adopted devices take the SSH login your UniFi Network application created for the site.
Step 1: get the SSH username and password
In UniFi Network, open the UniFi Devices page and click Device Updates and Settings, at the bottom of the left-hand panel. The username and password are under Device SSH Settings > Device SSH Authentication.
A factory-default device that was never adopted uses Ubiquiti's default login instead. Our post on the UniFi SSH password shows the panel with screenshots, lists the defaults per device and explains what to do when a password is lost.
Step 2: find the device's IP address
For an adopted device, the IP address is in the IP Address column of the UniFi Devices page.
For a device that isn't adopted yet, use Ubiquiti's WiFiman app. Its Discovery tab shows the IP address of UniFi devices on your network. The desktop version does device discovery too. Run it from a computer on the same network as the device.
Step 3: connect
Open a terminal (or PowerShell on Windows) and run:
ssh <username>@<device-ip>
The first time you connect, your SSH client asks you to confirm the device's key. Type yes, then enter the password.
After that you're in the device's shell. On the U6+ it's a BusyBox shell with Ubiquiti's login notice.
Read that notice once. It says that using SSH to change a device outside its normal scope voids the warranty.
Our own Fernando shows these steps in the video at the top of this page, published in May 2026. Labels may change in later UniFi Network versions.
SSH into a UniFi console or gateway
Consoles run UniFi OS: the Dream Machines, Cloud Gateways like the UCG Ultra, Cloud Keys and the UNVR. SSH is off on them by default.
- Open your console and go to Settings > Control Plane > Console.
- Check SSH.
- Connect with the username
root:
ssh root@192.168.1.1
Gateways without a built-in console, such as the UXG, also use root. Their password is the shared device SSH password from Step 1 above. Our UXG-Pro SSH guide has the details for that model.
UniFi OS 3.2.7 (December 2023) added an SSH lockout on consoles. Its release notes say 5 wrong passwords block SSH for 3 minutes. If a correct password suddenly fails, wait it out.
Connect without SSH: the Debug console
UniFi Network has a terminal built in. Ubiquiti calls it the Debug console and recommends it as the first option.
- Open the UniFi Devices page and select the device.
- In the device panel, open Settings.
- Scroll to the bottom and select Debug.
A terminal opens in your browser, already logged in to the device. It runs inside UniFi Network, so it should also work when you open the site remotely through UniFi Site Manager. Our second video below shows it used remotely. Ubiquiti's article doesn't mention remote use.
Two limits from Ubiquiti's article:
- The Debug console needs a working UniFi OS. If the network is down, you need SSH.
- It's not recommended for pasting long commands. Check anything you paste before pressing Enter.
Once you're in, our UniFi SSH commands cheat sheet lists the commands Ubiquiti documents, from set-inform to firmware upgrades and logs.
This video shows the Debug console in use. It was published in April 2025 and includes a step to enable Debug Tools that Ubiquiti's current article doesn't mention. Some labels may differ on newer versions.
When the SSH connection fails
| What you see | Likely cause | What to do |
|---|---|---|
| Connection refused or timed out | You're on a different network, or SSH is off | Connect from the same local network. On a console, enable SSH under Settings > Control Plane > Console |
| Permission denied | Wrong username or password | Use the credentials from Device SSH Settings. A factory-default device uses the default login |
| A correct console password stops working | 5 wrong attempts triggered the lockout | Wait 3 minutes |
| "REMOTE HOST IDENTIFICATION HAS CHANGED" | The IP now belongs to a different or reset device | Remove the old key with ssh-keygen -R <device-ip> and connect again |
Frequently asked questions
Is SSH enabled by default on UniFi devices?
Yes, on access points and switches. On consoles such as the Dream Machine Pro, Cloud Key and UNVR it's off until you check SSH under Settings > Control Plane > Console.
Can I SSH into a UniFi device remotely?
Yes, through the Debug console in UniFi Network. It runs inside UniFi Network, so it should work wherever you can open UniFi Network, though Ubiquiti's article doesn't mention remote use. Ubiquiti's SSH instructions require you to be on the same local network as the device.
What is the SSH username for a Dream Machine or Cloud Key?
root. Ubiquiti says the username is always root for consoles such as the UDM Pro, UNVR and Cloud Key, and for gateways such as the UXG Pro.
Can I use SSH keys instead of a password?
Yes. Add your public key under Device SSH Settings, below the username and password. UniFi Network 9.0.108 added support for ed25519 keys next to RSA.
Final thoughts
For access points and switches, SSH works out of the box once you have the site's device login. Consoles need one checkbox first. When you're not on site, the Debug console gets you a shell without a VPN.
That remote route matters most when your controller doesn't sit at the client's site. For a home lab, a controller on your own hardware is fine. For client networks, we run UniFi OS Server for MSPs, and the Debug console reaches your devices through it the same way.
Related guides
Keep reading
UniFi SSH commands: cheat sheet for APs, switches and gateways
The UniFi SSH commands you'll actually use: set-inform, firmware upgrades, logs and packet captures, plus the common ones Ubiquiti doesn't document.
Read guideUniFi SSH password and username: defaults, lookup and reset
The default UniFi SSH login per device, where UniFi Network shows the SSH password after adoption, and how to reset it when it's lost.
Read guideSSH on the UniFi UXG-Pro: A complete guide
SSH access on the UXG-Pro lets you control advanced settings from the command line, giving you more flexibility than the web interface alone.
Read guide