Stand with Ukraine flag
Try it now Pricing
IoT Gateway
Documentation > IoT Gateway features > Remote shell
Getting Started
Installation
On this page

How to enable remote shell feature on ThingsBoard IoT Gateway

This guide will help you to enable remote shell feature and control operation system with ThingsBoard IoT Gateway from your ThingsBoard platform instance.

For purpose of this guide, we will use following things:

  1. Instance of ThingsBoard platform (How to install you can read here). For this guide we will use thingsboard.cloud
  2. Installed and configured ThingsBoard IoT Gateway (How to install you can read here).

Step 1. Remote shell activation

  • To activate remote shell in ThingsBoard IoT Gateway you should add or change parameter remoteShell to true in the section thingsboard in the general configuration file (tb_gateway.yaml);


Doc info icon

WARNING: this feature can cause security problems for your device, we strongly recommend using it with ssl encryption only and not enabling it if you don’t need it.

  • Restart the gateway with the new configuration.

Example of the thingsboard section in the general configuration file:

1
2
3
4
5
6
7
8
9
10
{
  "thingsboard": {
    "host": "thingsboard.cloud",
    "port": 1883,
    "security": {
      "type": "accessToken",
      "accessToken": "YOUR_ACCESS_TOKEN"
    }
  },
}

Step 2. Create a dashboard to use the remote shell

To use the remote shell we have to use RPC remote shell widget from Control widget bundle.
To do this we use following steps:

  • Open Dashboards tab;

  • Add a new dashboard;

  • Open created dashboard, enter edit mode by clicking pencil button in the bottom right corner and click “Add new widget” button;

  • Select widget bundle - “Control widgets”;

  • Scroll down and select RPC remote shell widget;

  • We haven’t specify the entity type for the widget so we will create a new one;

  • Fill in required fields and same the entity. Gateway - is our gateway device;

  • To prevent TimeoutException, increase the default RPC command timeout to 5000 milliseconds in the advanced settings tab and press Add. Then apply all changes;

  • The connected widget looks like (Connection setups automatically);

  • Now you can use the shell to control device with the gateway. For example we run ls command to get the list of files and directories in the current directory.

Next steps

Explore guides related to main ThingsBoard features: