Contents
Introduction
A command-line interface (CLI) is a text-based user interface to communicate with computer system. This article will take Windows PC as example to describe how to access the CLI of Milesight devices.
Tool
- Any command-line interpreter or shell: Putty, Xshell, Powershell, Terminal, etc.
In this article, we will take Putty as example. You can click here to download Putty tool.
UR/UF Series Access
Applicable products: UR Series (except for UR75-504AE(-P-W2)), UF51-501EU
1. Connect PC to device locally (via LAN port, USB or Wi-Fi) or remotely.
2. Ensure SSH/Telnet service is enabled and check the service port number on web GUI. Note that if you access this device via remote network, ensure the remote access options are enabled.
3. Open Putty.exe software, select corresponding connection type as SSH or Telnet, then type in the device IP address (or domain name) and port, then click Open. If you connect PC to device LAN port or Wi-Fi, the Host Name is 192.168.1.1 by default.
4. Set the login name as admin and press Enter on the keyboard, type in the admin password and press Enter to complete the loggin.
Note: if you use other tools like terminal, please type command as this format to log in:
ssh admin@192.168.1.1
telnet admin@192.168.1.1
5. You can type the CLI commands to check device settings and configure devices.
How to Know the CLI Command of Device Setting
If you can not find the CLI commands on the list, please follow below operations to get the CLI commands:
1) Change log severity as Debug.
2) Record the time before your operation, then go to the target web GUI to change the settings as you required and click Save. In this example, we change the LAN port address from 192.168.2.1 to 192.168.3.1 and save the settings.
3) Go back to log view, you can find the CLI commands of these operations inside single quotes on the new printed logs. You can also download system.log to check these commands.
4) You can type these commands to check if it works. After settings type write to save the configurations.
UG Series Access
Method 1: SSH/Telnet
Applicable products: UG56/UG65/UG67
1. Connect PC to device locally (via Ethernet port or Wi-Fi) or remotely.
2. Ensure SSH/Telnet service is enabled and check the service port number on web GUI.
3. Open Putty.exe software, select corresponding connection type as SSH or Telnet, then type in the device IP address (or domain name) and port, then click Open. If you connect PC to device Wi-Fi, the Host Name is 192.168.1.1 by default; if you connect PC to device Ethernet port, the Host Name is 192.168.23.150 by default.
4. Set the login name as admin and press Enter on the keyboard, type in the admin password and press Enter to complete the loggin.
You can also log in device via root account.
Note:
Milesight gateway default root password: How to Use Node-RED to Change Gateway Root Password
Milesight Helium miner root password: click here to send serial number of device to acquire it.
Note: if you use other tools like terminal, please type command as this format to log in:
ssh admin@192.168.1.1
telnet admin@192.168.1.1
5. If you login via admin account, please use the CLI commands the same as routers to check device settings and configure devices; if you login via root account, please use common Linux commands to check device settings and configure devices.
Method 2: USB
1. Connect PC to device via type-C USB port.
2. Open Device Manager page (find it via search field or in the Control Panel) on the Windows PC, expand Ports (COM & LPT) menu to find the COM port number.
Note: if you can not find the COM on Ports (COM & LPT) and also find the abnormal prompt on Other devices menu, right click this item and click Update Driver to update the computer driver or click here to download and install driver.
3. Open Putty.exe software, select corresponding connection type as Serial, then type in the COM number, set the speed as 115200, then click Open.
4. Set the login name as admin and press Enter on the keyboard, type in the admin password and press Enter to complete the loggin.
VS121 Access
1. Connect PC to device via Wi-Fi and log in web GUI to ensure SSH service is enabled and check the service port number on web GUI.
2. Open Putty.exe software, select corresponding connection type as SSH or Telnet, then type in the device IP address and port, then click Open. The Host Name is 192.168.1.1 by default.
3. Set the login name as root and press Enter on the keyboard, type in the root password and press Enter to complete the loggin. The CLI of VS121 uses special commands and is mainly for device debug. Please contact Milesight technical support for the root password and command if there is any problem with this device.
Note: if you use other tools like terminal, please type command as this format to log in:
ssh root@192.168.1.1
VS13x Access
1. Connect PC to device via Wi-Fi or Ethernet port, and log in web GUI to ensure SSH service is enabled on web GUI.
2. Open Putty.exe software, select corresponding connection type as SSH or Telnet, then type in the device IP address and port (it's fixed as 22), then click Open. The Host Name is 192.168.1.1 by default.
3. Set the login name as root and press Enter on the keyboard, type in the root password and press Enter to complete the login. The CLI of VS13x uses special commands and is mainly for device debug. Please contact Milesight technical support for the root password and command if there is any problem with this device.
Note: if you use other tools like terminal, please type command as this format to log in:
ssh root@192.168.1.1
------END-----