Support Downloads Community

UniFi Video is an obsolete product line.

This application and its related devices will no longer receive any manner of technical support, including functional and security updates. Additionally, there will be no further updates to Help Center content pertaining to UniFi Video.

Intro to Networking - How to Establish a Connection Using SSH

This article describes the basics of the Secure Shell (SSH) network protocol and how to connect to a Ubiquiti device using SSH.

NOTES & REQUIREMENTS:

Establishing initial connectivity

Back to Top

Most devices manufactured by Ubiquiti Networks run a Linux-based operating system and can be interacted with at the command-line level. SSH provides a secure, encrypted method of remotely connecting to a device to access the Command Line Interface (CLI), assuming the device's IP address and access credentials are known. This allows for a safe way to read and write the configuration, access logs, and troubleshoot problems.

To discover Ubiquiti devices and their IP addresses, you can use the Ubiquiti WiFiman app (available for desktop and iOS and Android mobile apps).

topology.png

Accessing a Ubiquiti device (UDM-Pro) by connecting with an SSH Client on a workstation to the SSH Server on the router.

The exact steps on how to connect to the device and which credentials (username and password) to use will differ between the various Ubiquiti devices. For the most up-to-date information, we recommended downloading your device's Quick Start Guide (QSG) from our Download section.

NOTE: If you're having difficulty connecting to your device with SSH, try using the ping utility to verify reachability.

windows.png  Connect via SSH on Windows

Back to Top

Windows users can either use a third-party client such as PuTTY or install the Windows 10 OpenSSH client to connect using SSH.

 

Connect via SSH by using PuTTY

1. Either install the program (.msi) or download and run the standalone executable (.exe).

2. Select Run if prompted by a Windows security warning.

3. Enter the IP address of the Ubiquiti device in the Host Name (or IP address) box and leave the port set to 22.

4. The first connection to a device will prompt a host key warning that asks for confirmation to continue.  Select Yes to continue connecting. 

5. A command line (terminal) window will open that prompts for a username login.

6. Enter the username of the device and press Enter.

7. A welcome banner may appear, and you will now be prompted to enter the password. As you type while entering the password, no characters will appear on screen for security purposes.  Carefully enter the correct password, and press Enter. Example output below:

login as: ubnt
ubnt@192.168.1.1's password:
NOTE:For more information on the UniFi device usernames and passwords, see the UniFi - Accounts and Passwords for Ubiquiti, UniFi OS, and UniFi Devices.

For more information on default usernames and passwords for EdgeMAX, see EdgeRouter - User Accounts.

8. You will be presented with the device's welcome banner if the entered credentials were valid. A command prompt indicating your username and device name will indicate a successful connection and that the remote device is ready to accept commands.

 

Connect via SSH by using the Windows 10 OpenSSH client

1. Install the OpenSSH client using the instructions from the Microsoft article. 

2. Open PowerShell by navigating to Start > Windows PowerShell > Windows PowerShell.

3. A command line (terminal) window will open that accepts various input commands. 

4. Use the ssh command followed by the username and IP address of the Ubiquiti device (separated by the @ symbol).

ssh <username>@<ip-address>

5. Replace <username> and <ip-address> with the username and IP address used by the Ubiquiti device and press Enter. For example:

ssh ubnt@192.168.1.1
NOTE: For more information on the UniFi device usernames and passwords, see the UniFi - Accounts and Passwords for Ubiquiti, UniFi OS, and UniFi Devices.

For more information on default usernames and passwords for EdgeMAX, see EdgeRouter - User Accounts.

6. The first connection to a device will display a host authenticity warning and a prompt that asks for confirmation to continue.  Type yes and press Enter to continue connecting to the device. Example output below:

ssh ubnt@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
ECDSA key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (ECDSA) to the list of known hosts.
ubnt@192.168.1.1's password:

7. A welcome banner may appear, and you will now be prompted to enter the password. As you type while entering the password, no characters will appear on the screen for security purposes. Carefully enter the correct password, and press Enter.

8. You will be presented with the device's welcome banner if the entered credentials were valid. A command prompt indicating your username and device name will indicate a successful connection and that the remote device is ready to accept commands.

macos.png  Connect via SSH on macOS

Back to Top

To connect via SSH by using the built-in macOS SSH client:

1. Open the Terminal by navigating to Applications > Utilities > Terminal.

2. A command line (terminal) window will open that accepts various input commands. 

3. Use the ssh command followed by the username and IP address of the Ubiquiti device (separated by the @ symbol).

ssh <username>@<ip-address>

4. Replace <username> and <ip-address> with the username and IP address used by the Ubiquiti device and press Enter. For example:

ssh ubnt@192.168.1.1
NOTE: For more information on the UniFi device usernames and passwords, see the UniFi - Accounts and Passwords for Ubiquiti, UniFi OS, and UniFi Devices.

For more information on default usernames and passwords for EdgeMAX, see EdgeRouter - User Accounts.

5. The first connection to a device will display a host authenticity warning and a prompt that asks for confirmation to continue. Type yes and press Enter to continue connecting to the device. Example output below:

ssh ubnt@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
ECDSA key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (ECDSA) to the list of known hosts.
ubnt@192.168.1.1's password:

6. A welcome banner may appear, and you will now be prompted to enter the password. As you type while entering the password, no characters will appear on the screen for security purposes.  Carefully enter the correct password, and press Enter.

7. You will be presented with the device's welcome banner if the entered credentials were valid. A command prompt indicating your username and device name will indicate a successful connection and that the remote device is ready to accept commands.

macos.png  Connect via SSH on Linux

Back to Top

To connect via SSH by using the built-in Linux SSH client:

1. Open the Terminal which is typically located in the Utilities > Terminal section of the main menu.  On most distributions, you can also open the Terminal by pressing CTRL+ALT+T.

2. A command line (terminal) window will open that accepts various input commands. 

3. Use the ssh command followed by the username and IP address of the Ubiquiti device (separated by the @ symbol).

ssh <username>@<ip-address>

4. Replace <username> and <ip-address> with the username and IP address used by the Ubiquiti device and press Enter. For example:

ssh ubnt@192.168.1.1
NOTE: For more information on the UniFi device usernames and passwords, see the UniFi - Accounts and Passwords for Ubiquiti, UniFi OS, and UniFi Devices.

For more information on default usernames and passwords for EdgeMAX, see EdgeRouter - User Accounts.

5. The first connection to a device will display a host authenticity warning and a prompt that asks for confirmation to continue. Type yes and press Enter to continue connecting to the device. Example output below:

ssh ubnt@192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
ECDSA key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.1' (ECDSA) to the list of known hosts.
ubnt@192.168.1.1's password:

6. A welcome banner may appear, and you will now be prompted to enter the password. As you type while entering the password, no characters will appear on the screen for security purposes.  Carefully enter the correct password, and press Enter.

7. You will be presented with the device's welcome banner if the entered credentials were valid. A command prompt indicating your username and device name will indicate a successful connection and that the remote device is ready to accept commands.

Related articles

UniFi - Accounts and passwords for Ubiquiti, UniFi OS, and UniFi Devices
EdgeRouter - User Accounts

Was this article helpful?
240 out of 414 found this helpful