Version 73.2 by Xiaoling on 2023/06/01 16:46

Hide last authors
Xiaoling 30.2 1 **Table of Contents:**
Xiaoling 25.6 2
Edwin Chen 1.1 3 {{toc/}}
4
Xiaoling 25.6 5
6
Xiaoling 25.7 7
Xiaoling 71.2 8 = 1.  Monitor Gateway =
Edwin Chen 1.1 9
Xiaoling 71.2 10 == 1.1  Introduction ==
Edwin Chen 1.1 11
Xiaoling 30.2 12
Edwin Chen 1.1 13 This introduction shows how to use a script to monitor the gateway. The video link for this instruction is: [[https:~~/~~/youtu.be/8PieIwfSF_g>>url:https://youtu.be/8PieIwfSF_g]]
14
Xiaoling 51.2 15
Xiaoling 29.2 16 [[image:image-20220531155018-18.png]]
Edwin Chen 1.1 17
Xiaoling 8.3 18
Xiaoling 71.2 19 == 1.2  Steps ==
Edwin Chen 1.1 20
Xiaoling 30.2 21
Edwin Chen 1.1 22 * Create account in ThingsSpeak and creat channel.
Xiaoling 73.2 23
Edwin Chen 1.1 24 * Download script from dragino site and move it to properly directory
25
26 (% class="box infomessage" %)
27 (((
28 root@dragino-1baf44:~~# wget [[http:~~/~~/www.dragino.com/downloads/downloads/LoRa_Gateway/LPS8/Firmware/customized_script/monitor_gateway.sh>>url:http://www.dragino.com/downloads/downloads/LoRa_Gateway/LPS8/Firmware/customized_script/monitor_gateway.sh]]
29 Downloading '[[http:~~/~~/www.dragino.com/downloads/downloads/LoRa_Gateway/LPS8/Firmware/customized_script/monitor_gateway.sh'>>url:http://www.dragino.com/downloads/downloads/LoRa_Gateway/LPS8/Firmware/customized_script/monitor_gateway.sh']]
30 Connecting to 162.241.22.11:80
31 Writing to 'monitor_gateway.sh'
32 monitor_gateway.sh   100% |~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~**|  1860   0:00:00 ETA
33 Download completed (1860 bytes)
34 root@dragino-1baf44:~~# chmod +x monitor_gateway.sh;mv monitor_gateway.sh /usr/bin/
35 root@dragino-1baf44:~~#
36 root@dragino-1baf44:~~#
37 )))
38
Xiaoling 44.2 39
Xiaoling 51.2 40
Edwin Chen 1.1 41 * change the script monitor_gateway.sh with properly users setting:
42
43 (% class="box infomessage" %)
44 (((
45 USER='xxxxx'             # user name in your thinkspeak ~-~-> Profile
46 PASS='xxxxx'     #MQTT_API_KEY in your thinkspeak ~-~-> Profile
47 CHAN_ID='xxxx'    #Channel ID   of the channel for this gateway
48 CHAN_KEY='xxxxx'   #Channel Write API  of the channel for this gateway
49 )))
50
51
Xiaoling 51.2 52
Xiaoling 44.2 53 * run (% style="color:blue" %)**/usr/bin/monitor_gateway.sh**(%%) to test if upload is good.
Edwin Chen 1.1 54
Xiaoling 44.2 55 * Add monitor_gateway.sh to cron work (% style="color:blue" %)**/etc/crontabs/root**(%%) to make this script runs perdiocally, below is an example to update every 20 minutes
56
Edwin Chen 1.1 57 (% class="box infomessage" %)
58 (((
Edwin Chen 7.1 59 # For details see man 4 crontabs
Edwin Chen 1.1 60 # Example of job definition:
61 # .~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- minute (0 - 59)
62 # | .~-~-~-~-~-~-~-~-~-~-~-~-- hour (0 - 23)
63 # | | .~-~-~-~-~-~-~-~-~-~- day of month (1 - 31)
64 # | | | .~-~-~-~-~-~-- month (1 - 12) OR jan,feb,mar,apr ...
65 # | | | | .~-~-~-~- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
66 # | | | | |
67 # * * * * * user-name command to be executed
68 #*/10 * * * *  checklog
69 ~* 23 * * *  /etc/init.d/auto_update start
Edwin Chen 2.1 70 */20 * * * *  /usr/bin/monitor_gateway.sh     
Edwin Chen 1.1 71 )))
72
73 * Reboot device.
74
Xiaoling 64.2 75
Xiaoling 73.2 76
77
Xiaoling 71.2 78 == 1.3  Monitor Public IP ==
Xiaoling 30.2 79
Xiaoling 71.2 80
Edwin Chen 1.1 81 The monitor_gateway.sh has been updated to upload the public ip of the device as well.
82
83 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.
84
Xiaoling 44.2 85
Xiaoling 73.2 86 [[image:image-20220531145559-2.png||height="658" width="1233"]]
Edwin Chen 1.1 87
88 Find Public IP
89
90
Xiaoling 71.2 91 = 2.  Remote Access =
Edwin Chen 1.1 92
Xiaoling 72.2 93 == 2.1  Remote Access via Remote.it. ==
Edwin Chen 1.1 94
95
96 Remote.it for remote access is available in the latest Dragino firmware for gateway. For security concern, the remote.it only available base on end user demand.
97
98
Xiaoling 30.2 99 (% style="color:red" %)**Important Notice:**
100
Edwin Chen 1.1 101 * Remote.it access will give full control of your device to remote support.
Xiaoling 73.2 102
Kilight Cao 37.1 103 * The Remote.it allows Dragino Support to remote access to the device, If user want to access himself, it need to sign up for an remote.it account.
Xiaoling 73.2 104
Edwin Chen 51.1 105 * For how to use remote.it for (% style="color:blue" %)**general remote control**(%%), please see :  [[Remoteit user instruction for Dragino Gateway>>https://www.remote.it/getting-started/dragino]].
Xiaoling 73.2 106
Xiaoling 44.2 107 * For Quick add remote.it to (% style="color:blue" %)**Dragino for remote debug**(%%), please see below:
Edwin Chen 1.1 108
Xiaoling 44.2 109 (% style="color:blue" %)**1. Install the Remote.it software**
Edwin Chen 33.1 110
Xiaoling 44.10 111 Users can directly click** "Install"** on the Web UI to install Remote. it.
Edwin Chen 34.1 112
Xiaoling 44.2 113
Kilight Cao 41.1 114 [[image:image-20220725134300-1.png||height="438" width="905"]]
115
Kilight Cao 42.1 116
Kilight Cao 37.1 117
Xiaoling 44.2 118 (% style="color:blue" %)**2. Enter the license key**
119
Xiaoling 44.6 120 Users need to enter the license key in the box under **"2. Register"** section and click the **"Save"** button and** "Register"** button.
Kilight Cao 37.1 121
Kilight Cao 44.1 122 (% style="color:red" %)**When the user enters this license key, Dragino support will have access to your gateway.**
Kilight Cao 39.1 123
Xiaoling 44.2 124
Kilight Cao 37.1 125 (% class="box infomessage" %)
126 (((
Kilight Cao 72.1 127 **fd173d1d-faed-493e-a868-c511a38aba45**
Kilight Cao 37.1 128 )))
129
130 [[image:image-20220725113010-1.png||height="455" width="899"]]
131
132
133
Xiaoling 44.2 134 (% style="color:blue" %)**3. Connect and tell us your device ID or Hostname**
Kilight Cao 37.1 135
Xiaoling 44.2 136 Users can view the device ID or Hostname of the gateway on** (% style="color:red" %)System ~-~-> System Overview(%%)** interface.Such as : dragino-1ef9ac
137
138
Kilight Cao 37.1 139 [[image:image-20220725115720-2.png||height="658" width="900"]]
140
141
Xiaoling 72.2 142 === 2.1.1  How to save the registered remote after the gateway's firmware update. ===
Xiaoling 57.2 143
Xiaoling 44.2 144
Xiaoye 64.1 145 Before version [[lgw~~-~~-build-v5.4.1668240318-20221112-1606>>http://repo.dragino.com/release/miscellaneous/remoteit/dragino-lgw--v5.4.1668240318-squashfs-sysupgrade.bin]], once the gateway firmware is upgraded the remote configuration is gone.
Kilight Cao 49.1 146
Xiaoye 62.1 147 This issue is now corrected:
148
149
150
Xiaoling 72.2 151 ==== **The gateway version is lower than** **lgw~-~-build-v5.4.1668240318-20221112-1606:** ====
Xiaoye 62.1 152
153
Xiaoling 64.2 154 **~1. upload the [[backup file>>http://repo.dragino.com/release/miscellaneous/remoteit/backup.tar.gz]] to update the configuration.**
155
Xiaoye 62.1 156 [[image:image-20221112162644-4.png]]
157
158
159
Xiaoling 64.2 160 **2. Check the 'Preserver Settings' check box when you upgrade the gateway with the firmware. **
161
Xiaoye 62.1 162 [[image:image-20221112162543-2.png]]
163
164
165
Xiaoling 72.2 166 ==== **The gateway version is greater or equal to**  **lgw~-~-build-v5.4.1668240318-20221112-1606:** ====
Xiaoye 62.1 167
168
169
Xiaoling 64.2 170 **~1. Only to do: Check the 'Preserver Settings' check box when you upgrade the gateway with the firmware. **
171
Xiaoye 62.1 172 [[image:image-20221112162547-3.png]]
173
174
Xiaoling 72.3 175 === 2.1.2  How to register hp0d with Remote.it ===
Xiaoye 62.1 176
177
Xiaoling 73.2 178 (% style="color:blue" %)**Prerequisites:**
Kilight Cao 49.1 179
180 Users must have an account and APP for remote.it
181
Kilight Cao 71.1 182 **[[https:~~/~~/app.remote.it>>https://app.remote.it]]**
Kilight Cao 49.1 183
184
Xiaoling 72.3 185 ==== (% style="color:blue" %)**1.  Click "+" in the APP to add a device**(%%) ====
Kilight Cao 49.1 186
Xiaoling 64.2 187
Kilight Cao 49.1 188 Then click Add "Linux & Raspberry Pi" and the APP will generate a command to register the device.
189
190
191 [[image:image-20220815173938-1.jpeg||height="574" width="919"]]
192
193
Xiaoling 51.2 194
Xiaoling 72.3 195 ==== (% style="color:blue" %)**2.  Copy the register device command**(%%) ====
Kilight Cao 49.1 196
197
198 [[image:image-20220815173944-2.jpeg||height="556" width="923"]]
199
200
Xiaoling 51.2 201
Xiaoling 72.3 202 ==== (% style="color:blue" %)**3.  Enter the command copied from the previous step on the HP0D Linux command line**(%%) ====
Kilight Cao 49.1 203
Xiaoling 51.2 204
Kilight Cao 49.1 205 [[image:image-20220815173951-3.jpeg||height="424" width="1147"]]
206
207
Xiaoling 51.2 208
Xiaoling 72.3 209 ==== (% style="color:blue" %)**4.  Check whether the device is successfully registered on the Remote.it APP**(%%) ====
Kilight Cao 49.1 210
211
212 [[image:image-20220815173958-4.jpeg||height="580" width="964"]]
213
214
Xiaoling 72.3 215 === 2.1.3  How to register the gateway with Remote.it via SSH Access for Linux console ===
Xiaoling 57.2 216
Kilight Cao 57.1 217
Xiaoling 73.2 218 (% style="color:blue" %)**Prerequisites:**
Kilight Cao 57.1 219
Kilight Cao 71.1 220 Users must have an account and APP for remote.it
221
222 **[[https:~~/~~/app.remote.it>>https://app.remote.it]]**
223
224 For detailed examples, please see: **[[OpenWrt How to Connect Guide (remote.it)>>url:https://www.remote.it/getting-started/openwrt]]**
225
226
Xiaoling 72.3 227 ==== (% style="color:blue" %)**1.  Click "+" in the APP to add a device**(%%) ====
Kilight Cao 71.1 228
229
230 Then click Add "OpenWrt" and the APP will generate a command to register the device.
231
232 [[image:image-20230320110123-4.png||height="657" width="1191"]]
233
234
235
Xiaoling 72.3 236 ==== (% style="color:blue" %)**2.  Copy the register device command**(%%) ====
Kilight Cao 71.1 237
Xiaoling 72.3 238
Kilight Cao 71.1 239 [[image:image-20230320110309-5.png||height="635" width="1197"]]
240
241
242
Xiaoling 72.3 243 ==== (% style="color:blue" %)**3.  Enter the command copied from the previous step on the gateway Linux command line**(%%) ====
244
Kilight Cao 71.1 245
Xiaoling 72.4 246 (% class="wikigeneratedid" id="H" %)
247 [[image:image-20230320105212-1.png||height="758" width="820"]]
Kilight Cao 71.1 248
249
Xiaoling 72.4 250
Xiaoling 72.3 251 ==== (% style="color:blue" %)**4.  Check whether the device is successfully registered on the Remote.it APP**(%%) ====
Kilight Cao 71.1 252
Xiaoling 72.3 253
Kilight Cao 71.1 254 [[image:image-20230320112057-6.png||height="603" width="1135"]]
255
256
Xiaoling 72.3 257 === 2.1.4  Trouble Shooting ===
Kilight Cao 71.1 258
259
Xiaoling 72.3 260 ==== **1. What should users do when gateway Remote.it installation fails** ====
Kilight Cao 57.1 261
Xiaoling 57.4 262
Kilight Cao 57.1 263 [[image:image-20220907162028-4.png||height="564" width="1148"]]
264
265
Xiaoling 57.4 266 (% style="color:blue" %)**Step 1:  **(%%)Users can download the archive and upload it to the gateway:** [[attach:backup.tar.gz||target="_blank"]]**
Kilight Cao 57.1 267
268 [[image:image-20220907161050-2.png]]
269
270
271
Xiaoling 57.4 272 (% style="color:blue" %)**Step 2:  **(%%)Back to the Remote.it screen, and click **"Install"** again.
273
Kilight Cao 57.1 274 [[image:image-20220907161352-3.png]]
275
276
Xiaoling 57.4 277 (% style="color:blue" %)**Step 3:**(%%) Follow the [[Remoteit user instruction for Dragino Gateway>>https://www.remote.it/getting-started/dragino]] steps to reconfigure
Kilight Cao 57.1 278
279
Xiaoling 72.3 280 == 2.2  RSSH Introduction ==
Edwin Chen 1.1 281
Xiaoling 31.3 282
Edwin Chen 2.1 283 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.
Edwin Chen 1.1 284
Xiaoling 44.2 285 (% style="color:red" %)**Important Notice:**
Edwin Chen 1.1 286
Edwin Chen 2.2 287 (% class="box warningmessage" %)
Edwin Chen 2.1 288 (((
289 RSSH access will give full control of your device to remote support. Please remove sensitivity info before perform this
Edwin Chen 73.1 290 This RSSH allow Dragino Support Team to remote access to customer's device. Customer is not able to remote access it via Dragino Server.
291
292 If user want to access himself, he need to set up the RSSH server himself.
Edwin Chen 2.1 293 )))
294
295
Xiaoling 44.6 296 **Below gateway support reverse SSH access:**
297
Edwin Chen 4.1 298 * Firmware Version > lgw~-~-build-v5.4.1618196981-20210412-1111 [[Firmware Download>>url:http://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/LPS8/Firmware/Release/]]
Edwin Chen 2.1 299 * LG01N, OLG01N (Note: LG01-P LG01-S doesn't support)
300 * LG02, OLG02
301 * LG308, DLOS8
302 * LPS8
303 * LIG16
304 * MS14 series if installed with the same firmware.
305
Xiaoling 72.3 306
Xiaoling 73.2 307
Xiaoling 71.2 308 === 2.2.1  End User Guide to use SSH access ===
309
310
Edwin Chen 4.1 311 Go to this the Reverse SSH page as below:
Edwin Chen 1.1 312
Xiaoling 44.3 313
Xiaoling 11.2 314 [[image:image-20220531150151-3.png]]
Edwin Chen 1.1 315
Edwin Chen 4.1 316 Get the RSSH configure page
Edwin Chen 1.1 317
Xiaoling 11.3 318
319
Xiaoling 12.2 320 [[image:image-20220531150338-4.png]]
Edwin Chen 1.1 321
Edwin Chen 4.1 322 Connection OK.
323
Xiaoling 12.2 324
Xiaoling 30.4 325 * (% style="color:#037691" %)**Login ID**(%%):  Input sshuser
326 * (% style="color:#037691" %)**Host Address**(%%):  Input support.dragino.com
327 * (% style="color:#037691" %)**Host Port** (%%):  Please email to support @ dragino.com to get a valid host port.
Xiaoling 12.3 328 * (% style="color:#037691" %)**Connect at Startup**(%%) : Choose to enable connect once the device is powered.
Xiaoling 30.4 329 * (% style="color:#037691" %)**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
Edwin Chen 4.1 330
331 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.
332
Edwin Chen 5.1 333
Xiaoling 71.2 334 === 2.2.2  Set Up RSSH Server ===
Xiaoling 30.5 335
Xiaoling 44.3 336
Edwin Chen 5.2 337 Advance administrator can config a SSH server to provide support their end user themselves., Steps as below
Edwin Chen 5.1 338
339
Xiaoling 9.7 340
Xiaoling 44.3 341 ==== (% style="color:blue" %)**Step 1 :  Download the SSH service code**(%%) ====
Edwin Chen 5.1 342
Xiaoling 30.5 343
344 **1).**  git clone [[https:~~/~~/github.com/dragino/rssh-server.git>>url:https://github.com/dragino/rssh-server.git]] rssh-server
345
Xiaoling 13.2 346 [[image:image-20220531150750-5.png]]
Edwin Chen 5.1 347
348
Xiaoling 30.5 349 **2).**  cd rssh-server; sudo make ~-~--> to Generate the execute file:rssh_serv
350
Xiaoling 14.2 351 [[image:image-20220531150811-6.png]]
Edwin Chen 5.1 352
353
354 **Debug** :
355
Xiaoling 14.3 356 (((
357 (% class="box" %)
358 (((
359 if you git fail.  ~-~->  (% style="color:#037691" %)**sudo: git: command not found**(%%).
360 please install git.  ~-~->    (% style="color:#037691" %)**yum install git -y  or  apt-get install git -y**(%%).
361 if you make error 127,it** (% style="color:#037691" %)lack of gcc(%%)**.
362 please install gcc.  ~-~->  (% style="color:#037691" %)**yum install gcc**(%%).
363 )))
364 )))
Edwin Chen 5.1 365
Xiaoling 15.2 366 [[image:image-20220531151516-7.png]]
Edwin Chen 5.1 367
368
Xiaoling 15.2 369 (((
370 (% class="box" %)
371 (((
372 if you make a fatal error : sqlite3.h,it (% style="color:#037691" %)**lack of sqlite3**(%%).
373 please insatell sqlite3.
374 )))
375 )))
Edwin Chen 5.1 376
Xiaoling 16.2 377 [[image:image-20220531151628-8.png]]
Edwin Chen 5.1 378
379
Xiaoling 44.8 380 (% style="color:blue" %)**How to install Sqlit3:**
Edwin Chen 5.1 381
Edwin Chen 5.2 382 (% class="box infomessage" %)
383 (((
Xiaoling 44.3 384 **~ Step 1:** Download the SQLit3 installation package
Xiaoling 30.5 385 sudo wget **[[https:~~/~~/www.sqlite.org/2021/sqlite-autoconf-3350400.tar.gz>>url:https://www.sqlite.org/2021/sqlite-autoconf-3350400.tar.gz]]**
Xiaoling 16.4 386
Xiaoling 44.3 387 **Step 2: **tar the SQLit3 installation package
Edwin Chen 5.1 388 sudo tar -zxvf sqlite-autoconf-3350300.tar.gz
Xiaoling 30.5 389
Xiaoling 44.3 390 **Step 3:** Generate the makefile
Edwin Chen 5.1 391 cd sqlite-autoconf-3350300/;./configure
Xiaoling 30.5 392
Xiaoling 44.3 393 **Step 4:** Compile makefile
Edwin Chen 5.1 394 sudo make
Xiaoling 30.5 395
Xiaoling 44.3 396 **Step 5:** Install makefile
Edwin Chen 5.1 397 sudo make install
Xiaoling 30.5 398
399 **Check:**
Xiaoling 44.3 400 cd /usr/local/bin;ls -al  ~-~->    Check to see if there is a file for sqlite3
Edwin Chen 5.2 401 cd sqlite-autoconf-3350300/;./sqlite3 test.db        ~-~->    Test whether the sqlite3 was installed successfully
Xiaoling 30.5 402
403 **debug:**
Edwin Chen 5.1 404 If you get the imformation that is SQLite header and source version mismatch, when you execute./sqlite3 test.db.
405 Please execute the command /sbin/ldconfig.
406 After that execute the command ./sqlite3 test.db again.
Edwin Chen 5.2 407 )))
408
409
410
Xiaoling 44.3 411 ==== (% style="color:blue" %)**Step 2 :  Install and run the RSS service**(%%) ====
Edwin Chen 5.2 412
Xiaoling 30.5 413
414 **1). ** install database for /var/rsshdb.sqlite3 and Server development port for 3721(The default is 3721)
415
Edwin Chen 5.2 416 user must enter the root account and run the following commands
417
418 (% class="box infomessage" %)
419 (((
Xiaoling 44.9 420 **$ ./create_sqlite3_db.sh
Edwin Chen 5.2 421 $ ./rssh_serv -p  3721 2>&1 &
Xiaoling 44.9 422 $ ps -ef | grep rssh_serv check 3721 port**
Edwin Chen 5.2 423 )))
424
Xiaoling 18.2 425 [[image:image-20220531151958-10.png]]
Edwin Chen 5.2 426
427
428 **Debug:**
429
430 {{{ Check /var/rsshdb.sqlite3 --> ls /var/rsshdb.sqlite3
431 Check ls /var/rsshdb.sqlite3 --> sudo chmod 777 rssh_serv
Edwin Chen 5.1 432 }}}
433
Edwin Chen 5.2 434 {{{ if fail to open dpvlry or to bind to it
435 please kill rssh_serv,and run ./rssh_serv -p 3721 2>&1 & again
436 }}}
Edwin Chen 5.1 437
Edwin Chen 5.2 438
439
Xiaoling 44.3 440 ==== (% style="color:blue" %)**Step 3 :  Create a minimal SSH user (reverse SSH proxy for the gateway)**(%%) ====
Edwin Chen 5.2 441
Xiaoling 30.5 442
Edwin Chen 5.2 443 (% class="box infomessage" %)
444 (((
Xiaoling 30.5 445 **1):**  sudo useradd XXXXX (custom user name)
446 **2):**  sudo passwd xxxxxx
447 **3):**  cp /bin/bash /bin/rbash
448 **4):**  sudo nano /etc/passwd ~-~-> Change /bin/bash to /bin/rbash
449 **5):**  sudo nano /home/xxxxx/.bashrc **empty it,and input export PATH=$HOME/bin**
450 **6):**  sudo nano /home/xxxxx/.bash_profile **empty it,and input export PATH=$HOME/bin**
Edwin Chen 5.2 451 )))
452
Xiaoling 30.5 453 (% style="color:red" %)**Now user "XXXXX" is the user with limited permissions of the current system**
Edwin Chen 5.2 454
Edwin Chen 7.1 455
Xiaoling 18.3 456
Xiaoling 44.3 457 ==== (% style="color:blue" %)**Step 4 :  Create an authorization key file**(%%) ====
Edwin Chen 7.1 458
459
Xiaoling 30.5 460 **1):**  sudo mkdir /home/xxxxx/.ssh; sudo touch /home/xxxxx/.ssh/authorizedkey
461
Xiaoling 44.12 462
Edwin Chen 7.1 463 **Debug:**
464
465 {{{ check: sudo ls /home/xxxxx/.ssh/authorizedkey}}}
466
467
Xiaoling 71.2 468 === 2.2.3  How does user get the gateway to connect to a user's private server ===
Edwin Chen 7.1 469
Edwin Chen 5.2 470
471
Xiaoling 44.3 472 ==== (% style="color:blue" %)**Step 1 :  Come back the gateway web UI to get the gateway Public key**(%%) ====
Edwin Chen 5.2 473
Xiaoling 44.3 474
Xiaoling 30.5 475 **1)**  in the system ~-~-> (% style="color:#037691" %)**Remote Mgmt/span**
476
Xiaoling 19.2 477 [[image:image-20220531152419-11.png]]
Edwin Chen 5.2 478
479
480
Xiaoling 44.3 481 ==== (% style="color:blue" %)**Step 2 :  Authorization server**(%%) ====
Xiaoling 30.5 482
483
Edwin Chen 7.1 484 Input the Gateway Publickey into user's private server "/home/XXXXX/.ssh/authorized_keys" file.
Edwin Chen 5.2 485
Xiaoling 20.2 486 [[image:image-20220531152549-12.png]]
Edwin Chen 5.2 487
488
489
Xiaoling 44.3 490 ==== (% style="color:blue" %)**Step 3 :  Connect private server**(%%) ====
Xiaoling 30.5 491
492
Edwin Chen 7.1 493 This is same as connect Dragino Support Server but just change the server address to customize server address.
Edwin Chen 5.2 494
Xiaoling 21.2 495 [[image:image-20220531152633-13.png]]
Edwin Chen 5.2 496
497
498
Xiaoling 44.3 499 ==== (% style="color:blue" %)**Step 4 :  Check Connection**(%%) ====
Edwin Chen 5.2 500
Xiaoling 30.5 501
Edwin Chen 5.2 502 Rssh Host connection Ok
503
Xiaoling 22.2 504 [[image:image-20220531152815-14.png]]
Edwin Chen 5.2 505
506
Edwin Chen 7.1 507 User can use common ps | grep ssh to check it in the gateway.
Edwin Chen 5.2 508
Xiaoling 23.2 509 [[image:image-20220531152840-15.png]]
Edwin Chen 5.2 510
511
512
Xiaoling 44.3 513 ==== (% style="color:blue" %)**Step 5 :  Access the gateway from customized server**(%%) ====
Xiaoling 30.5 514
515
Edwin Chen 7.1 516 Check what gateways link to server.
Edwin Chen 5.2 517
Xiaoling 24.2 518 (% class="box infomessage" %)
519 (((
Xiaoling 44.3 520 **$ ./connect-gw.sh -l**
Xiaoling 24.2 521 )))
Edwin Chen 5.2 522
Xiaoling 24.2 523 [[image:image-20220531153016-16.png]]
Edwin Chen 5.2 524
525
526
Edwin Chen 7.1 527 Access the gateway
Edwin Chen 5.2 528
Xiaoling 25.2 529 (% class="box infomessage" %)
530 (((
Xiaoling 44.3 531 **$ ./connect-gw.sh <GWID>**
Xiaoling 25.2 532 )))
Edwin Chen 5.2 533
Xiaoling 25.2 534 [[image:image-20220531153219-17.png]]
Xiaoling 73.2 535
536