Skip to content

TDC‐E L4M Configuration and Connections

tkrzielSICKAG edited this page May 23, 2024 · 3 revisions

In this section, L4M configuration and connections will be discussed. Firstly, the process of connecting to your TDC-E device via ssh in the terminal and PuTTY are discussed. Secondly, the removal process of the Hardware Interface Container is shown and described.

1. Connecting to your Device

In this section, the connection to the TDC-E device for L4M version 2023.3. is discussed. The section is divided into two subsections. The first describes key generation for the TDC-E device, which is a necessary step for any kind of connection. The second subsection deals with the connection process to the TDC-E device, demonstrated with the ssh terminal command and Putty.

1.1. Generating SSH Key

Generating a SSH key is a crucial step upon installing L4M, as access is not possible without it. To generate this key, go to the Security tab on the left side of the screen and select the SSH subtab on the Device Manager.

image

The status should be Enabled. To generate a key, press the Generate button. This service generates a private SSH key to ensure maximum security of your device. Note that the key is private, and should be stored somewhere safe, and never be shared. This key will then be used to access your TDC-E device.

NOTE: You can regenerate your SSH key anytime, but keep in mind it that this implies updating all the services that used this key, as the previous SSH key will no longer be useable.

1.2. Using SSH Key to Connect

The private SSH key is now used for connection to your TDC-E device. First, the ssh terminal command will be used to connect to the TDC-E device. Next up, we will use Putty to demonstrate the connection process.

1.2.1. Connecting to the TDC-E via terminal

Open the terminal. To connect to your TDC-E device, type the following command:

ssh -i [PATH-TO-GENERATED-KEY] [email protected]

Replace the [PATH-TO-GENERATED-KEY] with the path to the stored SSH key, as the -i flag specifies the file from which the key for authentication is read. For example, if you named your key tdce.key, and you opened the terminal in the same directory as this key, type ssh -i tdce.key [email protected]. You will automatically be logged in.

1.2.2. Connecting to the TDC-E via PuTTY

For the connection process using PuTTY, two applications are used:

  • PuTTY
  • PuTTYgen

PuTTYgen is used to generate a PuTTY key, which is of a different format than the SSH key generated on the Device Manager. Open PuTTYgen. Select the Conversions tab, then select Import Key. Find the generated key. Make sure to set the following parameters:

  • public key from file (set automatically)
  • key fingerprint from file (set automatically)
  • key comment
  • type of key to generate: EdDSA
  • curve to use for generating this key: Ed25519 (255 bits)

You can also set up a key passphrase.

Your screen should look like this:

Capture

Now, select the option Save private key. Exit the program.

Open PuTTY, and create a session, specifying the host name, port and connection type to connect to. In the Category section on the left, find and expand the Connection tab, then expand SSH and expand the Auth tab. You can now see a field which requires a Private key file for authentication.

image

Browse for the PuTTY key (saved with the .ppk extension). Go back to the Session tab so as to save your session. Load the session and type in root when prompted for a password. You are now connected to the TDC-E's terminal.

image

2. Removing the Hardware Interface Container

This section of the documentation discusses the removal of the Hardware Interface Container of the TDC-E device. Standardly, the Interface Container can be found on this website.

For code snippets without the hardware interface, refer to this part of the Development Documentation.

To remove the Hardware Interface Container, go to Portainer. From the drop down menu, select Containers. There should be a list of available containers that are running on the TDC-E. See the image below as an example.

Capture1

This TDC-E device currently has four containers running. Note the two containers labeled hwinterface-ui and hwinterface-service. These containers contain the UI and the services of the Hardware Interface running in the background. To remove them, simply check the boxes on their left, then select the Remove button to remove them completely. You will once again be prompted whether you would really like to remove the containers in question. See the image below as a guide.

Capture3

After confirming your choice, the Portainer will no longer house the selected containers.

Capture2

You've thus removed the containers, and the Hardware Interface will no longer be available, even after the device's reboot.