Remote Terminal

<< Click to Display Table of Contents >>

Navigation:  Components > Communication >

Remote Terminal

This component is used to execute commands on remote devices using SSH access.

 

Please note the information below on how the remote terminal commands work and function. Please also bear in mind that this is not an interactive terminal programme such as Putty, MobaXterm, etc., but only individual commands with corresponding restrictions (no interaction possible) can be sent from a created list or via text input fields.

 

Data points of the component

Name

Type

Function

Command (asynchronous)

Input

Any (valid) command to be executed on the remote machine can be sent to this data point. The command is executed asynchronously - the response is issued on the command response datapoint after the command is completed.

Command (synchronous)

Input

Any (valid) command to be executed on the remote machine can be sent to this data point. The response is issued on the command response data point.

Command response

Output

Output of the command response of commands triggered via the two global command data points.

Connection

Folder

This folder contains data points that can be used to change the terminal connection at runtime. The "Text input" component can be used for this purpose, for example. To accept all entries, the Reinitialise data point must  be triggered.

Diagnosis [Text]

Output

Error texts are output here. These can be displayed e.g. with the component "Protocol window". Attention: Diagnosis or debug outputs are only provided for the case of an error. Please use only after consultation with the support team! If used, these can considerably impair the performance of the service

Dynamic

Folder

Two data points are created in the "Dynaamish" folder for each of the predefined channels/commands - one for triggering the command and one for the respective command response.

Extended diagnostics

Input

(De)Enables the extended debug output. Attention: Diagnosis or Debug - outputs are only provided for the case of an error. Please use only after consultation with the support team! If used, these can significantly affect the performance of the service

Driver On/Off

Bidirectional

(De)Activate the component

Connection

Folder

This folder contains data points that can be used to change the terminal connection at runtime. The "Text input" component can be used for this purpose, for example. To accept all entries, the Reinitialise data point must  be triggered.

Driver status

Output

Shows whether the driver is On (true) or Off (false).

 

 

Properties of the component

Name

Standard

Function

Connection

 

Connection settings to the remote system

Channels

0

Here the devices can be imported or set. If a command should be executed asynchronously (e.g. a long lasting backup process), this can be selected separately for each channel.

Driver On/Off

 

(De)Activate the component.

 

Note:
The call of commands is a self-contained session - i.e. when calling another command, the effects of the previous one are usually no longer present (e.g. directory change). Furthermore, no interaction is possible via the executed terminal command - the call of commands that require e.g. sudo is not possible without further ado (since sudo always requires an interaction to enter the password). However, there are several solutions for this problem (some of which involve removing the security settings):

 

Variant 1:
Using optimized echo: -> echo -e 'SUDO_PASSWORD\n' | sudo -S /sbin/reboot -n the reboot command would work the same way.

Variant 2:
1. save your file / etc / sudoers by entering the following command: sudo cp / etc / sudoers /root/sudoers.bak
2. edit the file / etc / sudoers by entering the command visudo: sudo visudo
3. add the line like this in the file / etc / sudoers for the user named "vivek" to execute the commands "/ bin / kill" and "systemctl": user ALL = NOPASSWD: / sbin / reboot
4. save and exit the file.

This means that the user "user" no longer needs a password when calling sudo for the command /sbin/reboot. The polar bear can then be used to send the command "sudo /sbin/reboot -n", for example.