Unifi ssh commands

Unifi ssh commands DEFAULT

SSH Into Ubiquiti Access Point

I recently set up a Ubiquiti access point (model UAP-AC-PRO-US). Part of the process required me to log into the access point, but I could not find any connection details such as the port, username, or password. After a bit of digging, I figured it out.

Logging into AP before it is adopted

When your access point is new and hasn’t been connected to your UniFi controller yet, the default SSH credentials are:

Port: 22 Username: ubnt Password: ubnt

You can find the IP address for the access point listed in the UniFi controller’s Devices page. In my case, the IP address was . To log in, I ran the following command from my terminal:

[[email protected]~]$ssh [email protected] [email protected]'s password: ubnt BusyBox v1.25.1 () built-in shell (ash) ___ ___ .__________.__ | | |____ |__\_ ____/__| | | / \| || __) | | (c) 2010-2019 | | | | \ || \ | | Ubiquiti Networks, Inc. |______|___| /__||__/ |__| |_/ https://www.ui.com/ Welcome to UniFi UAP-AC-Pro-Gen2! UBNT-BZ.v4.0.21#

Logging into AP after it is adopted

If the access point is already adopted and provisioned, the UniFi controller changed the SSH login credentials for it. If your UniFi controller already manages other access points, the new access point’s SSH credentials are changed to the same credentials. If this is the first access point added to the UniFi controller, the new username is and the password was randomized.

If you need to change the SSH login credentials for the access point, please read this article.

To find the IP address for your access point, log into your UniFi controller and go to the Devices page. Assuming that the access point’s IP is , the username is , and the password is (please do not use this as your password), you can SSH into the access point with a command such as the following:

[[email protected]~]$ssh [email protected] [email protected]'s password: password BusyBox v1.25.1 () built-in shell (ash) ___ ___ .__________.__ | | |____ |__\_ ____/__| | | / \| || __) | | (c) 2010-2019 | | | | \ || \ | | Ubiquiti Networks, Inc. |______|___| /__||__/ |__| |_/ https://www.ui.com/ Welcome to UniFi UAP-AC-Pro-Gen2! UBNT-BZ.v4.0.21#

Fix “no matching MAC found”

Your system’s SSH client might have restrictions that prevent the commands above from working properly. For example, you might run into the following issue:

[[email protected]~]$ssh [email protected] Unable to negotiate with 10.0.0.103 port 22: no matching MAC found. Their offer: hmac-sha1,hmac-md5 [[email protected]~]$

This can be fixed by supplying an additional option to the command as shown below.

[[email protected]~]$ssh -o MACs=hmac-sha1,hmac-md5 [email protected] [email protected]'s password: ubnt BusyBox v1.25.1 () built-in shell (ash) ___ ___ .__________.__ | | |____ |__\_ ____/__| | | / \| || __) | | (c) 2010-2019 | | | | \ || \ | | Ubiquiti Networks, Inc. |______|___| /__||__/ |__| |_/ https://www.ui.com/ Welcome to UniFi UAP-AC-Pro-Gen2! UBNT-BZ.v4.0.21#

Did I help you?

Sours: https://chrisjean.com/ssh-into-ubiquiti-access-point/

How To SSH Into Your UniFi Dream Machine

SSH into the UDM with the username of “root” and the password you just set

  • Open your terminal application of choice. There are many applications that you can use, but some quick recommendations based on your OS:

  • If your IP address is 192.168.1.1, you’d type ssh [email protected] and hit enter. Replace the IP, but the username is always root.

  • If this is your first time accessing the device, accept the authenticity of the host key by typing yes and hit enter

  • Access the UniFi OS shell by typing unifi-os shell and hit enter

What You Can Do With SSH Access

If you’re not familar with SSH, Ubiquiti has a good help page which introduces what SSH is and how it works. The one sentence summary is that SSH allows for a safe way to read and write the configuration, access logs, and troubleshoot problems.

The “configuration” part doesn’t really apply to the UDM, though. With the UDM, you have to make your permanent configuration changes through the web UI. The UDM doesn’t have a configuration shell, you will only have direct Linux shell access. The Unifi service or a firmware update will overwrite most things you can change.

UbiOS/UniFi OS is based on Buildroot Linux, and is Ubiquiti’s custom implementation. You are not allowed to install packages or modify things like you might be used to on other Linux-based devices. With that said, there’s still a few things you can do.

Available commands

Typing “help” shows an incomplete list of the commands that are available:

Built-in commands available to root user:

. : [ [[ alias bg break cd chdir
command continue echo eval exec
exit export false fg getopts
hash help history jobs kill let
local printf pwd read readonly
return set shift source test times
trap true type ulimit umask
unalias unset wait

Standard Linux commands like ifconfig, tcpdump, netstat, whoami and cat are also available. There are also some commands and files that are unique to the UDM and not well documented by Ubiquiti. This reddit thread shows a good list of these unique commands, file locations, and what they are good for. Refer to the commands on the right side of the table

Retrieve Log Files

This is Ubiquiti's help article for how to retrieve log files. You can use view the specific logs you’re interested in by using the cat command, or view live logs with tail.

  • Show UniFi server logs with: cat /mnt/data/unifi-os/unifi/logs/server.log

  • Show UniFi system logs with: cat /mnt/data/unifi-os/unifi-core/logs/system.log

  • Refer to Ubiquiti’s help page and this Reddit thread for more examples.

Manual Firmware Upgrade

Sours: https://evanmccann.net/blog/2020/5/udm-ssh
  1. John deere 2025r maintenance schedule
  2. Pickup coil tap
  3. Luxury apartments encino ca
  4. Honda odyssey fl350
  5. Podium quartier 2020

Hello,

I was able to login to some Ubiquiti switches via ssh but its a cli with only 4 commands available - "info", "ugrade" and a coupe of others. How do I actually manage the switch! Is there a software download or something from them that I need?

Thanks.


Best Answer

Justin1250

Mace

OP

tolinrome wrote:

48 port edgeswitch. which software?

So It is an ES- model not a US- model?

In that case, Edge Switch would be CLI or Web interface.

https://www.ubnt.com/download/edgemax/edgeswitch

See the admin guide there.

View this "Best Answer" in the replies below »

12 Replies

· · ·

jonahzona

Datil

OP

Yes, you likely need to download their controller software.

https://www.ubnt.com/download/unifi

3

· · ·

Justin1250

Mace

OP

If they are the Unifi line switches you will need the Unifi controller software or a cloud key.

https://www.ubnt.com/download/unifi

3

· · ·

tolinrome

Jalapeno

OP

48 port edgeswitch. which software?

0

· · ·

Justin1250

Mace

OP

Best Answer

tolinrome wrote:

48 port edgeswitch. which software?

So It is an ES- model not a US- model?

In that case, Edge Switch would be CLI or Web interface.

https://www.ubnt.com/download/edgemax/edgeswitch

See the admin guide there.

4

· · ·

tolinrome

Jalapeno

OP

I cant http/https into them with the IP's I can ssh into them with. Strange.

0

· · ·

tolinrome

Jalapeno

OP

The switches are already configured and on the network.. I'm just trying to access them to manage them.

0

· · ·

dpaul

Thai Pepper

OP

While I have never used an ES from Ubiquiti, have you tried connecting to via serial cable to see if you get different commands?

0

· · ·

Justin1250

Mace

OP

Can you post the output of the info command from the CLI?

0

· · ·

brandon220

Thai Pepper

OP

https://dl.ubnt.com/guides/edgemax/EdgeSwitch_CLI_Command_Reference_UG.pdf

There is a section regarding http/https access.  Follow the commands to ensure http access is enabled.

0

· · ·

Aaron9615

Thai Pepper

OP

Once on the command line you need to type enable to go deeper into the switch. Once at this point you can type configure to change the actual parameters of the switch. Let me know if you need help with the syntax I have configured quite a few of these.

Edited May 30, 2017 at 20:31 UTC

1

· · ·

dbeato

Pure Capsaicin

OP

Ubiquiti Switches are managed through the CLI or Web Interface directly to the switch IP address. Look at the Admin Guide below:

https://dl.ubnt.com/guides/edgemax/EdgeSwitch_AdminGuide.pdf

0

· · ·

Mike Dresser

Tabasco

OP

Unifi switches do have a higher level you can get into.. once you're ssh'd in, you telnet localhost, and then run en

That'll unlock a bunch more stuff, including being able to look at the fiber SFP ports to see what's going on if it's not linking. (you can get the serial number of your modules, the signal levels, etc)

The unifi software controls all that though, so any changes probably aren't going to be kept.

0

This topic has been locked by an administrator and is no longer open for commenting.

To continue this discussion, please ask a new question.

Sours: https://community.spiceworks.com/topic/2000224-ubiquiti-switches-how-to-manage
New Unifi 10GB Switch. Unifi Switch Flex XG

Incredigeek

ssh [email protected]

AP:

list how many devices are connected.

wstalist |grep \"mac\" |wc -l or wstalist |grep -c \"mac\"

List connected devices

wstalist

List ip’s of connected devices

wstalist |grep \"lastip\" | awk '{print $3}' | sed s/\"/\ /g | sed s/,//g

List connected devices with the device name and ip address of device

wstalist |grep -A1 \"name\" | sed s/\"/\ /g | sed s/,//g | grep -v "\--"

List connected devices along with device name, and signal.

wstalist |grep -A6 \"name\" | grep -E -v 'rx|tx|associd|aprepeater' | sed s/\"/\ /g | sed s/,//g | grep -v "\--"

 

Station:

Signal:

mca-status | grep signal

Signal, essid, frequency, noise, and ccq:

mca-status | grep -A4 essid

List basic info like device name, mac address, firmware version, platform, etc.

mca-status | head -n 1

Show Firmware Version:

mca-status | head -n 1 | awk -F, '{print $3}'

 

 

 

 

 

This entry was posted in Command Line, Ubiquiti and tagged airmax, nanostation, ns, powerbeam, radio, ssh, ubiquiti, ubnt by admin. Bookmark the permalink. Sours: https://www.incredigeek.com/home/ubiquiti-airmax-ssh-commands/

Commands unifi ssh

How to Guide: Ubiquiti UniFi L3 SSH Connection and Adoption

Regular UniFi adoption is preformed over Layer 2. L2 adoption on UniFi (where the devices and UniFi Network application are on the same network) uses self discovery, any locally-available, unmanaged UniFi Devices will appear as “Pending Adoption” in the UniFi Network application itself (in the Devices section). This is the most typical adoption method and is perfectly serviceable in most use cases.

But what if you are not on the same network? If your UniFi network controller is at a remote location, such as a head office, second premises or even hosted on AWS you can uses Layer 3 Adoption via SSH.

This is useful if you manage multiple offices centrally on a virtual machine or provide management services to end users. Read our Ubiquiti UniFi Controller guide here to find out more about these methods.

If you can SSH into the device, it’s possible to L3 adopt via CLI command. There are various methods for this depending on the device/OS you use. The main methods are outlined below:

 Connect via SSH on Windows

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 [email protected]'s password:

  Connect via SSH on macOS

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>

Click to copy

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

ssh [email protected]

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

ssh [email protected] 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. [email protected]'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.


  Connect via SSH on Linux

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>

Click to copy

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

ssh [email protected]

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 [email protected] 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. [email protected]'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.


Once you have successfully connected to your Unifi device, you well need to follow these steps in order to direct the unit to your controller.

1. Make sure the device is running updated firmware. If not, follow the sub steps bullet pointed below.

  •  Copy the link of your device’s firmware download link from here.
  • When connected via SSH into the device run the upgrade command followed by the download link. For Example –
upgrade https://dl.ui.com/unifi/firmware/UAL6/5.60.1.12923/BZ.mt7621_5.60.1+12923.210416.1641.bin

2. Make sure the device is in the factory default state. If it’s not, run the following command:

sudo syswrapper.sh restore-default

3. SSH into the device and type the following and hit enter, substituting “ip-of-host” with the IP address of the host of your UniFi Network application:

set-inform http://ip-of-host:8080/inform

4. After issuing the set-inform, the UniFi device will show up for adoption in the Devices section of UniFi Network. Once you click Adopt, the device will appear to go offline or have the status of “Adopting” then proceed to “Provision” and “Connected”.

If the device does not appear after 10-15 minutes, try step 3 and 4 again.

You now have a remotely adopted UniFi device. For more assistance, call our technical team on 01449 724255or email [email protected].

Sours: https://blog.linitx.com/how-to-guide-ubiquiti-unifi-l3-ssh-connection-and-adoption/
Adopt Unifi via SSH

UniFi Cloud Adoption - SSH Method

SSH Method

1. Download, install, and run: Ubiquiti Device Discovery Tool
2. Click "Scan"

3. Click "UniFi Family" to switch to the UniFi device view

4. Copy the IP address of the device
5. Download, install, and run: PuTTY
6. Enter the IP address of the UniFi device, Port 22, Connection type: SSH, and click "Open"


7. Log in
The default username is ubnt and password is ubnt. 

  • If the device has been adopted previously, it will need to be factory reset by holding the reset ping for 30 seconds

  • Device credentials can also be retrieved from the previous UniFi controller under Settings > Site > Device Authentication after you "Enable advanced features" under Settings > Site

  • The password will not appear in the PuTTY window as you type it

8. set-inform http://your-server:8080/inform
Enter the set-inform command above, replacing "your-server" with your HostiFi server name. Make sure to use http:// and :8080/inform, which is the protocol and port used for device communication. Always use a DNS name instead of an IP address, that way devices will not disconnect if the IP address of the controller ever changes

9. The device will show up for adoption on ALL sites in your UniFi controller, use the sites drop down in the upper right corner to switch to the site you want the device to be adopted in, then click "Adopt"

10. The device status should change quickly from "Pending" to "Adopting"

11. set-inform http://your-server:8080/inform
Enter the set-inform command from step 8 again to complete the adoption request

12. The device status should change quickly from "Adopting" to "Provisioning"

13. The device will receive its new configuration from UniFi and reboot, then the status will change to "Connected"

14. From there you can upgrade the device firmware, and begin configuring your network under Settings!

Sours: https://support.hostifi.com/en/articles/3044211-unifi-cloud-adoption-ssh-method

You will also be interested:

ssh reset/adopting unify ap

SSH to your Unifi ap

ssh [email protected]_ip_address
#default password is "ubnt".


Reset to defaults

#You must reset the AP to defaults before changing the inform ip address. To do so execute the following command

syswrapper.sh restore-default

#This will reboot the ap and disconnect your SSH session.
#Once it comes back online, you will need to reconnect.


Set new inform IP address

#Connect to the mca client

mca-cli

#Now issue the set-inform command with the IP address of your Unifi controller.

set-inform http://192.168.3.2:8080/inform

#The AP should connect to the controller within a few seconds and you are set.

Example:

[email protected]:~$ ssh [email protected]
[email protected]'s password:

BusyBox v1.11.2 (2013-06-28 16:11:52 PDT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

BZ.v2.4.5# mca-cli
UniFi# set-inform https://192.168.1.21:8080/inform

Adoption request sent to 'https://192.168.1.21:8080/inform'.

1. please adopt it on the controller
2. issue the set-inform command again
3. <inform_url> will be saved after device is successfully managed
Sours: https://sites.google.com/site/altwhy/wiki/ssh-reset-adopting-unify-ap


733 734 735 736 737