Table of Contents:

1.  Monitor Gateway

1.1  Introduction

This introduction shows how to use a script to monitor the gateway. The video link for this instruction is:


1.2  Steps

  • Create account in ThingsSpeak and creat channel.
  • Download script from dragino site and move it to properly directory

root@dragino-1baf44:~# wget
Downloading ''
Connecting to
Writing to ''   100% |*******************************|  1860   0:00:00 ETA
Download completed (1860 bytes)
root@dragino-1baf44:~# chmod +x;mv /usr/bin/

  • change the script with properly users setting:

USER='xxxxx'             # user name in your thinkspeak --> Profile
PASS='xxxxx'     #MQTT_API_KEY in your thinkspeak --> Profile
CHAN_ID='xxxx'    #Channel ID   of the channel for this gateway
CHAN_KEY='xxxxx'   #Channel Write API  of the channel for this gateway

  • run /usr/bin/ to test if upload is good.
  • Add to cron work /etc/crontabs/root to make this script runs perdiocally, below is an example to update every 20 minutes

# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
#*/10 * * * *  checklog
* 23 * * *  /etc/init.d/auto_update start
*/20 * * * *  /usr/bin/      

  • Reboot device.

1.3  Monitor Public IP

The has been updated to upload the public ip of the device as well.

User can find the public ip in field7, the chart is not able to show the complete public ip, user can check that in the export.


Find Public IP

2.  Remote Access

2.1  Remote Access via for remote access is available in the latest Dragino firmware for gateway. For security concern, the only available base on end user demand.

Important Notice:

  • access will give full control of your device to remote support.
  • The allows Dragino Support to remote access to the device, If user want to access himself, it need to sign up for an account.

1. Install the software

Users can directly click "Install" on the Web UI to install Remote. it.


2. Enter the license key

Users need to enter the license key in the box under "2. Register" section and click the "Save" button and "Register" button.

When the user enters this license key, Dragino support will have access to your gateway.



3. Connect and tell us your device ID or Hostname

Users can view the device ID or Hostname of the gateway on System --> System Overview interface.Such as : dragino-1ef9ac


2.1.1  How to save the registered remote after the gateway's firmware update.

Before version lgw--build-v5.4.1668240318-20221112-1606, once the gateway firmware is upgraded the remote configuration is gone.

This issue is now corrected:

The gateway version is lower than lgw--build-v5.4.1668240318-20221112-1606:

1. upload the backup file to update the configuration.


2. Check the 'Preserver Settings' check box when you upgrade the gateway with the firmware. 


The gateway version is greater or equal to  lgw--build-v5.4.1668240318-20221112-1606:

1. Only to do: Check the 'Preserver Settings' check box when you upgrade the gateway with the firmware. 


2.1.2  How to register hp0d with


Users must have an account and APP for

1.  Click "+" in the APP to add a device

Then click Add "Linux & Raspberry Pi" and the APP will generate a command to register the device.


2.  Copy the register device command


3.  Enter the command copied from the previous step on the HP0D Linux command line


4.  Check whether the device is successfully registered on the APP


2.1.3  Trouble Shooting

1. What should users do when gateway installation fails


Step 1:  Users can download the archive and upload it to the gateway: backup.tar.gz


Step 2:  Back to the screen, and click "Install" again.


Step 3: Follow the Remoteit user instruction for Dragino Gateway steps to reconfigure 

2.2  RSSH Introduction

Reverse SSH for remote access is available in the latest Dragino firmware for gateway. For security concern, the RSSH only available base on end user demand.

Important Notice:

RSSH access will give full control of your device to remote support. Please remove sensitivity info before perform this
This RSSH allow Dragino Support to remote access to the device, If user want to access himself, he need to set up the RSSH server himself.

Below gateway support reverse SSH access:

  • Firmware Version > lgw--build-v5.4.1618196981-20210412-1111 Firmware Download
  • LG01N, OLG01N (Note: LG01-P LG01-S doesn't support)
  • LG02, OLG02
  • LG308, DLOS8
  • LPS8
  • LIG16
  • MS14 series if installed with the same firmware.

2.2.1  End User Guide to use SSH access

Go to this the Reverse SSH page as below:


Get the RSSH configure page


Connection OK.

  • Login ID:          Input sshuser
  • Host Address:  Input
  • Host Port :       Please email to support @ to get a valid host port.
  • Connect at Startup : Choose to enable connect once the device is powered.
  • Network Keys:          Click the Generate keys to generate the keys and download / mail it to Dragino support so Dragino can prepare the remote access to

After doing above, please download and mail the public keys to Dragino support and wait for our mail for the valid host port. Input the valid host port got from our support and click connect so we can remote access to your gateway.

2.2.2  Set Up RSSH Server

Advance administrator can config a SSH server to provide support their end user themselves., Steps as below

Step 1 :  Download the SSH service code

1).  git clone rssh-server


2).  cd rssh-server; sudo make ---> to Generate the execute file:rssh_serv


Debug :

if you git fail.         -->    sudo: git: command not found.
please install git.   -->    yum install git -y  or  apt-get install git -y.
if you make error 127,it lack of gcc.
please install gcc.  -->   yum install gcc.


if you make a fatal error : sqlite3.h,it lack of sqlite3.
please insatell sqlite3.


How to install Sqlit3:

 Step 1: Download the SQLit3 installation package
            sudo wget

Step 2: tar the SQLit3 installation package
           sudo tar -zxvf sqlite-autoconf-3350300.tar.gz

Step 3: Generate the makefile
           cd sqlite-autoconf-3350300/;./configure

Step 4: Compile makefile
           sudo make

Step 5: Install makefile
           sudo make install

           cd /usr/local/bin;ls -al                                            -->    Check to see if there is a file for sqlite3
           cd sqlite-autoconf-3350300/;./sqlite3 test.db        -->    Test whether the sqlite3 was installed successfully

          If you get the imformation that is SQLite header and source version mismatch, when you execute./sqlite3 test.db.
          Please execute the command /sbin/ldconfig.
          After that execute the command ./sqlite3 test.db again.

Step 2 :  Install and run the RSS service

1).   install database for /var/rsshdb.sqlite3 and Server development port for 3721(The default is 3721)

user must enter the root account and run the following commands

$ ./
$ ./rssh_serv -p  3721 2>&1 &
$ ps -ef | grep rssh_serv check 3721 port



 Check /var/rsshdb.sqlite3 --> ls /var/rsshdb.sqlite3
 Check ls /var/rsshdb.sqlite3 --> sudo chmod 777 rssh_serv
 if fail to open dpvlry or to bind to it
 please kill rssh_serv,and run  ./rssh_serv -p  3721 2>&1 &  again

Step 3 :  Create a minimal SSH user (reverse SSH proxy for the gateway)

1):  sudo useradd XXXXX (custom user name)
2):  sudo passwd xxxxxx
3):  cp /bin/bash /bin/rbash
4):  sudo nano /etc/passwd --> Change /bin/bash to /bin/rbash
5):  sudo nano /home/xxxxx/.bashrc empty it,and input export PATH=$HOME/bin
6):  sudo nano /home/xxxxx/.bash_profile empty it,and input export PATH=$HOME/bin

Now user "XXXXX" is the user with limited permissions of the current system

Step 4 :  Create an authorization key file

1):  sudo mkdir /home/xxxxx/.ssh; sudo touch /home/xxxxx/.ssh/authorizedkey


 check: sudo ls /home/xxxxx/.ssh/authorizedkey

2.2.3  How does user get the gateway to connect to a user's private server

Step 1 :  Come back the gateway web UI to get the gateway Public key

1)  in the system --> Remote Mgmt/span


Step 2 :  Authorization server

Input the Gateway Publickey into user's private server "/home/XXXXX/.ssh/authorized_keys" file.


Step 3 :  Connect private server

This is same as connect Dragino Support Server but just change the server address to customize server address.


Step 4 :  Check Connection

Rssh Host connection Ok


User can use common ps | grep ssh to check it in the gateway.


Step 5 :  Access the gateway from customized server

Check what gateways link to server. 

$ ./ -l


Access the gateway

$ ./ <GWID>


Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0