<
From version < 19.2 >
edited by Xiaoling
on 2022/05/30 11:30
To version < 19.17 >
edited by Xiaoling
on 2022/07/14 14:16
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,11 +1,12 @@
1 - **Contents:**
1 + **Table of Contents:**
2 2  
3 3  {{toc/}}
4 4  
5 5  
6 6  
7 -= **1. Use Remote.it service** =
7 += **1.  Use Remote.it service** =
8 8  
9 +
9 9  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.
10 10  
11 11  (% style="color:red" %)**Important Notice:**
... ... @@ -16,8 +16,9 @@
16 16  For how to use remoteit, please see : [[Remoteit user instruction for Dragino Gateway>>url:https://www.dragino.com/downloads/index.php?dir=LoRa_Gateway/&file=Dragino-Remoteit_User_Manual.pdf]].
17 17  
18 18  
19 -= **2. RSSH Introduction** =
20 += **2.  RSSH Introduction** =
20 20  
22 +
21 21  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.
22 22  
23 23  (% style="color:red" %)**Important Notice:**
... ... @@ -36,11 +36,12 @@
36 36  * MS14 series if installed with the same firmware.
37 37  
38 38  
41 +== **2.1  For Firmware Version lower than lgw~-~-build-v5.4.1616478814-20210323-1355** ==
39 39  
40 -== **2.1 For Firmware Version lower than lgw~-~-build-v5.4.1616478814-20210323-1355** ==
41 41  
42 -=== **2.1.1 End User Guide to use SSH access** ===
44 +=== **2.1.1  End User Guide to use SSH access** ===
43 43  
46 +
44 44  Go to this the Reverse SSH page as below:
45 45  
46 46  [[image:image-20220527102348-1.png]]
... ... @@ -52,11 +52,11 @@
52 52  
53 53  Connection OK.
54 54  
55 -* (% style="color:#4f81bd" %)**Login ID**(%%): Input (% style="color:#4f81bd" %)**sshuser**
56 -* (% style="color:#4f81bd" %)**Host Address**(%%): Input** (% style="color:#4f81bd" %)support.dragino.com(%%)**
57 -* (% style="color:#4f81bd" %)**Host Port**(%%): Please email to support @ dragino.com to get a valid host port.
58 +* (% style="color:#4f81bd" %)**Login ID**(%%):  Input (% style="color:#4f81bd" %)**sshuser**
59 +* (% style="color:#4f81bd" %)**Host Address**(%%):  Input** (% style="color:#4f81bd" %)support.dragino.com(%%)**
60 +* (% style="color:#4f81bd" %)**Host Port**(%%):  Please email to support @ dragino.com to get a valid host port.
58 58  * (% style="color:#4f81bd" %)**Connect at Startupt**(%%): Choose to enable connect once device is powered.
59 -* (% style="color:#4f81bd" %)**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
62 +* (% style="color:#4f81bd" %)**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
60 60  
61 61  (((
62 62  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.
... ... @@ -63,8 +63,10 @@
63 63  )))
64 64  
65 65  
66 -=== **2.1.2 How to Ser up a Reverse SSH access** ===
67 67  
70 +=== **2.1.2  How to Ser up a Reverse SSH access** ===
71 +
72 +
68 68  Advance administrator can config a SSH server to provide support their end user themselves. Instruction is as below:
69 69  
70 70  1. Prepare a Linux server with public IP. The gateways need to be able to create SSH connection to this server. We recommend to use a server that performs no other function than to support the RSSH access, and to have no additional accounts active, and no access from the Internet that uses ID/password authentication.
... ... @@ -83,8 +83,9 @@
83 83  )))
84 84  
85 85  
86 -==== **2.1.2.1 Note for set up RSSH server** ====
87 87  
92 +==== **2.1.2.1  Note for set up RSSH server** ====
93 +
88 88  If gateway reboot or the connection is incidentely close by end node. The port in SSH server will still be occupy for a long time. Administrator can use below commands to release the port.
89 89  
90 90  (% class="box" %)
... ... @@ -98,7 +98,7 @@
98 98  )))
99 99  
100 100  
101 -== **2.2 For Firmware Version higher than lgw~-~-build-v5.4.1618196981-20210412-1111** ==
107 +== **2.2  For Firmware Version higher than lgw~-~-build-v5.4.1618196981-20210412-1111** ==
102 102  
103 103  Below gateway support reverse SSH access:
104 104  
... ... @@ -113,20 +113,23 @@
113 113  )))
114 114  
115 115  
116 -=== **2.2.1 End User Guide to use SSH access** ===
122 +=== **2.2.1  End User Guide to use SSH access** ===
117 117  
118 -==== **2.2.1.1 Install the SSH service for server** ====
119 119  
120 -===== **2.2.1.1.1 Step 1:Download the SSH service code** =====
125 +==== **2.2.1.1  Install the SSH service for server** ====
121 121  
122 -1).git clone [[https:~~/~~/github.com/dragino/rssh-server.git>>url:https://github.com/dragino/rssh-server.git]] rssh-server
123 123  
128 +===== (% style="color:blue" %)**Step 1 : Download the SSH service code**(%%) =====
129 +
130 +
131 +**1).  **git clone [[https:~~/~~/github.com/dragino/rssh-server.git>>url:https://github.com/dragino/rssh-server.git]] rssh-server
132 +
124 124  [[image:image-20220527105447-1.png]]
125 125  
126 126  git clone rssh-server
127 127  
128 128  
129 -2).cd rssh-server; sudo make ~-~--> to Generate the execute file:rssh_serv
138 +**2). ** cd rssh-server; sudo make ~-~--> to Generate the execute file:rssh_serv
130 130  
131 131  [[image:image-20220527105511-2.png]]
132 132  
... ... @@ -162,24 +162,30 @@
162 162  lack of sqlite3
163 163  
164 164  
165 -How to install Sqlit3
174 +(% style="color:blue" %)**How to install Sqlit3:**
166 166  
167 167  (% class="box" %)
168 168  (((
169 -Step1: Download the SQLit3 installation package
178 +**Step1:** Download the SQLit3 installation package
170 170   sudo wget [[https:~~/~~/www.sqlite.org/2021/sqlite-autoconf-3350400.tar.gz>>url:https://www.sqlite.org/2021/sqlite-autoconf-3350400.tar.gz]]
171 -Step2: tar the SQLit3 installation package
180 +
181 +**Step2:** tar the SQLit3 installation package
172 172   sudo tar -zxvf sqlite-autoconf-3350300.tar.gz
173 -Step3: Generate the makefile
183 +
184 +**Step3:** Generate the makefile
174 174   cd sqlite-autoconf-3350300/;./configure
175 -Step4: Compile makefile
186 +
187 +**Step4:** Compile makefile
176 176   sudo make
177 -Step5: Install makefile
189 +
190 +**Step5: **Install makefile
178 178   sudo make install
179 -Check:
192 +
193 +**Check:**
180 180   cd /usr/local/bin;ls -al                             ~-~->    Check to see if there is a file for sqlite3
181 181   cd sqlite-autoconf-3350300/;./sqlite3 test.db        ~-~->    Test whether the sqlite3 was installed successfully
182 -debug:
196 +
197 +**debug:**
183 183   If you get the imformation that is SQLite header and source version mismatch, when you execute./sqlite3 test.db.
184 184   Please execute the command /sbin/ldconfig.
185 185   After that execute the command ./sqlite3 test.db again.
... ... @@ -186,10 +186,12 @@
186 186  )))
187 187  
188 188  
189 -===== **2.2.1.1.2 Step 2 :Install and run the RSS service** =====
190 190  
191 -1): intall database for /var/rsshdb.sqlite3 and Server development port for 3721(The default is 3721)
205 +===== (% style="color:blue" %)**Step 2 : Install and run the RSS service**(%%) =====
192 192  
207 +
208 +**1):**  intall database for /var/rsshdb.sqlite3 and Server development port for 3721(The default is 3721)
209 +
193 193  user must enter the root account and run the following commands
194 194  
195 195  (% class="box" %)
... ... @@ -203,6 +203,7 @@
203 203  
204 204  intall database and server development port
205 205  
223 +
206 206  **Debug:**
207 207  
208 208  (% class="box" %)
... ... @@ -218,8 +218,10 @@
218 218  )))
219 219  
220 220  
221 -===== **2.2.1.1.3 Step 3 :Create a minimal SSH user (reverse SSH proxy for the gateway)** =====
222 222  
240 +===== (% style="color:blue" %)**Step 3 : Create a minimal SSH user (reverse SSH proxy for the gateway)**(%%) =====
241 +
242 +
223 223  **1): (% style="color:#4f81bd" %)sudo useradd XXXXX(%%)** (custom user name)
224 224  
225 225  **2):** (% style="color:#4f81bd" %)**sudo passwd xxxxxx**
... ... @@ -232,22 +232,28 @@
232 232  
233 233  **6):** (% style="color:#4f81bd" %)**sudo nano /home/xxxxx/.bash_profile**(%%) **empty it,and input export PATH=$HOME/bin**
234 234  
235 -**Now user "XXXXX" is the user with limited permissions of the current system**
236 236  
256 +(% style="color:red" %)**Now user "XXXXX" is the user with limited permissions of the current system**
237 237  
238 -=== **2.2.2 How does user get the gateway to connect to a user's private server** ===
239 239  
240 -===== **2.2.2.1 Step1: Come bace the gateway web UI for get the gateway Public key** =====
241 241  
242 -1) in the system ~-~-> (% style="color:#4f81bd" %)**Remote Mgmt/span>**
260 +=== **2.2.2  How does user get the gateway to connect to a user's private server** ===
243 243  
262 +
263 +===== (% style="color:blue" %)**Step 1 : Come bace the gateway web UI for get the gateway Public key**(%%) =====
264 +
265 +
266 +**1) **in the system ~-~-> (% style="color:#4f81bd" %)**Remote Mgmt**
267 +
244 244  [[image:image-20220527110531-7.png]]
245 245  
246 246  Remote Mgmt
247 247  
248 248  
249 -===== **2.2.2.2 Step2: Authorization server** =====
250 250  
274 +===== (% style="color:blue" %)**Step 2 : Authorization server**(%%) =====
275 +
276 +
251 251  copy the Gateway Publickey into user's private server "/home/XXXXX/.ssh/authorized_keys" file.
252 252  
253 253  [[image:image-20220527110625-8.png]]
... ... @@ -255,8 +255,10 @@
255 255  Publickey
256 256  
257 257  
258 -===== **2.2.2.3 Step3: connecte private server** =====
259 259  
285 +===== (% style="color:blue" %)**Step 3 : connecte private server**(%%) =====
286 +
287 +
260 260  in the gateway web UI
261 261  
262 262  [[image:image-20220527110700-9.png]]
... ... @@ -263,19 +263,22 @@
263 263  
264 264  gateway web UI
265 265  
294 +
266 266  (% class="box" %)
267 267  (((
268 -(% style="color:#4f81bd" %)**Connection Type **(%%) : If user's least privileged user with private server uses a password, select (% style="color:#4f81bd" %)**Public Key**(%%)
269 -**Note:if user's least privileged user no uses a password,choose from both is fine**
270 -(% style="color:#4f81bd" %)**Login ID**(%%)             : Input user name "eg : "XXXXX"
271 -(% style="color:#4f81bd" %)**Host Address**(%%)         : Input user's private server address
272 -(% style="color:#4f81bd" %)**Connect at Startupt**(%%): Choose to enable connect once device is powered.
297 +(% style="color:#4f81bd" %)**Connection Type **(%%) If user's least privileged user with private server uses a password, select (% style="color:#4f81bd" %)**Public Key**(%%)
298 +(% style="color:red" %)**Note: if user's least privileged user no uses a password,choose from both is fine**(%%)
299 +(% style="color:#4f81bd" %)**Login ID**(%%) :  Input user name "eg : "XXXXX"
300 +(% style="color:#4f81bd" %)**Host Address**(%%)  :  Input user's private server address
301 +(% style="color:#4f81bd" %)**Connect at Startupt**(%%):  Choose to enable connect once device is powered.
273 273  Click Save and then Connect
274 274  )))
275 275  
276 276  
277 -===== **2.2.2.4 Step 4 :Cheak is fine** =====
278 278  
307 +===== (% style="color:blue" %)**Step 4 : Cheak is fine**(%%) =====
308 +
309 +
279 279  Rssh Host connection Ok
280 280  
281 281  [[image:image-20220527111009-10.png]]
... ... @@ -290,32 +290,38 @@
290 290  Check the gateway
291 291  
292 292  
293 -===== **2.2.2.5 Step5:Create an authorization key file** =====
294 294  
295 -1):sudo mkdir /home/xxxxx/.ssh; sudo touch /home/xxxxx/.ssh/authorizedkey
325 +===== (% style="color:blue" %)**Step 5 : Create an authorization key file**(%%) =====
296 296  
327 +
328 +**1):**  sudo mkdir /home/xxxxx/.ssh; sudo touch /home/xxxxx/.ssh/authorizedkey
329 +
297 297  **Debug:**
298 298  
299 299  (% class="box" %)
300 300  (((
301 - check: sudo ls /home/xxxxx/.ssh/authorizedkey
334 +**~ check: sudo ls /home/xxxxx/.ssh/authorizedkey**
302 302  )))
303 303  
304 304  
305 -=== **2.2.3 How to Ser up a Reverse SSH access** ===
338 +=== **2.2.3  How to Ser up a Reverse SSH access** ===
306 306  
307 -==== **2.2.3.1 Step1: Log into the server system** ====
308 308  
341 +==== (% style="color:blue" %)**Step 1 : Log into the server system**(%%) ====
342 +
343 +
309 309  [[image:image-20220527111145-12.png]]
310 310  
311 311  Loging server
312 312  
313 313  
314 -==== **2.2.3.2 Step2:access the gateway** ====
315 315  
350 +==== (% style="color:blue" %)**Step 2 : access the gateway**(%%) ====
351 +
352 +
316 316  (% class="box" %)
317 317  (((
318 -$ cd rssh-server/
355 +**$ cd rssh-server/**
319 319  )))
320 320  
321 321  Check the gateway linking to the server $ ./connect-gw.sh -l
... ... @@ -325,8 +325,11 @@
325 325  Check the gateway linking to the server
326 326  
327 327  
365 +
328 328  access the gateway $ ./connect-gw.sh <GWID>
329 329  
330 330  [[image:image-20220527111300-14.png]]
331 331  
332 332  reverse ssh access the gateway
371 +
372 +
Copyright ©2010-2022 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0