Ubiquiti SSH Management

To connect via SSH to Ubiquiti equipment (UBNT) from Windows, you can use the popular PuTTY utility.
From Linux, you can connect by typing the command:

ssh username@192.168.1.2

Before changing the settings, I recommend making a backup from the web interface or command from Linux:

sudo sshpass -p "PASSWORD" scp -oStrictHostKeyChecking=no username@192.168.1.2:/tmp/system.cfg /backups/192.168.1.2_system.cfg

Below is a list of some of the commands.

View memory usage and memory information:

free
cat /proc/meminfo

View processor usage, processor statistics, processor information, and view interrupts:

top
cat /proc/stat
cat /proc/cpuinfo
cat /proc/interrupts

View routing table:

route -n

View kernel version and loaded modules:

cat /proc/version
lsmod

Information about network connections and the status of all network interfaces:

netstat
ip link show

View network interfaces and statistics on them:

cat /proc/net/dev

View network interface configuration:

iwconfig
iwconfig ath0

Wifi Scan:

iwlist scan

Reboot device:

reboot

General device statistics:

mca-status

Wi-fi statistics and the number of connected clients to the access point:

wstalist
wstalist |grep "mac" |wc -l

View signal strength:

mca-status | grep signal
mca-status | grep "signal=" | cut -d= -f2

View noise level:

mca-status | grep "noise=" | cut -d= -f2

I will give commands for editing the configuration file.

View the configuration file (the downloaded file is located at /tmp/running.cfg, you do not need to touch it):

cat /tmp/system.cfg

Editing the configuration file (x – deleting a character, a – adding, Esc – returning to command mode, :x – saving changes to the file and exit the editor):

vi /tmp/system.cfg

After the change, save the configuration file and apply it with the commands:

cfgmtd -f /tmp/system.cfg -w
/usr/etc/rc.d/rc.softrestart save

The standard output from the help command is:

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

You can reset the settings to standard using the commands:

cfgmtd -w -f /etc/default.cfg
reboot

You can also connect via SSH to other devices, for example with the command:

ssh -p 22 username@192.168.1.5

See also my articles:
Ubiquiti Rocket M5 configuration file description
Using the vim text editor
How to enable Web Server on Ubiquiti via SSH
Backup Ubiquiti Device Configuration (UBNT)
How to Change MAC Address on Ubiquiti (UBNT) Device

Leave a comment

Leave a Reply