July 30, 2023

tSSH – Docs for ESB 7.x

tSSH

Establishes a communication with distant server and returns securely sensible
information.

Returns data from a remote computer, based on the secure shell
command defined.

tSSH Standard properties

These properties are used to configure tSSH running in the Standard Job framework.

The Standard
tSSH component belongs to the System family.

The component in this framework is available in all Talend
products
.

Basic settings

Schema and Edit
Schema

A schema is a row description, it defines the number of fields to
be processed and passed on to the next component. The schema is
either Built-in or stored remotely
in the Repository.

Click Edit
schema
to make changes to the schema. If the current schema is of the Repository type, three options are available:

  • View schema: choose this
    option to view the schema only.

  • Change to built-in property:
    choose this option to change the schema to Built-in for local changes.

  • Update repository connection:
    choose this option to change the schema stored in the repository and decide whether
    to propagate the changes to all the Jobs upon completion. If you just want to
    propagate the changes to the current Job, you can select No upon completion and choose this schema metadata
    again in the Repository Content
    window.

Click Sync columns to retrieve
the schema from the preceding component in the Job.

 

Built-in: You create and store
the schema locally for this component only. Related topic: see

Talend Studio User
Guide
.

 

Repository: You have already
created the schema and stored it in the Repository. You can reuse it
in various projects and job flowcharts. Related topic: see

Talend Studio User
Guide

Host

IP address

Port

Listening port number

User

User authentication information

Public Key/Key
Passphrase
/Private Key

Select the relevant option.

In case of Public Key, type in
the passphrase, if required, in the Key
Passphrase
field and then in the Private key field, type in the private
key or click the three dot button next to the Private key field to browse to it.

To enter the passphrase, click the […] button next to
the passphrase field, and then in the pop-up dialog box enter the passphrase between double
quotes and click OK to save the settings.

Password/Password

Select the relevant option.

In case of Password,type in the
required password in the Password
field.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

Keyboard Interactive/Password

Select the relevant option.

In case of Keyboard Interactive,
type in the required password in the Password field.

To enter the password, click the […] button next to the
password field, and then in the pop-up dialog box enter the password between double quotes
and click OK to save the settings.

Pseudo terminal

Select this check box to call the interactive shell that performs
the terminal operations.

Command separator

Type in the command separator required. Once the Pseudo terminal check box is selected,
this field becomes unavailable.

Commands

Type in the command for the relevant information to be returned
from the remote computer. When you select the Pseudo terminal check box, this table becomes a
terminal emulator and each row in this table is a single
command.

Use timeout/timeout in
seconds

Define the timeout time period. A timeout message will be
generated if the actual response time exceeds this expected
processing time.

Standard Output

Select the destination to which the standard output is returned.
The output may be returned to:

to console: the output is
displayed in the console of the Run
view.

to global variable: the output
is indicated by the corresponding global variable.

both to console and global
variable
: the output is indicated both of the two
means.

normal: the output is a
standard ssh output.

Error Output

Select the destination to which the error output is returned. The
output may be returned to:

to console: the output is
displayed in the console of the Run
view.

to global variable: the output
is indicated by the corresponding global variable.

both to console and global
variable
: the output is indicated both of the two
means.

normal: the output is a
standard ssh output.

Advanced settings

tStatCatcher Statistics

Select this check box to gather the processing metadata at the Job
level as well as at each component level.

Global Variables

Global Variables

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

STDOUT: the standard execution output of the remote
command. This is an After variable and it returns a string.

STDERR: the error execution output of the remote command.
This is an After variable and it returns a string.

EXIT_CODE: the exit code of the remote command. This is
an After variable and it returns an integer.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see
Talend Studio

User Guide.

Usage

Usage rule

This component can be used as standalone component.

Note that for some sensitive information such as password and
username, you can define the context variables in the Contexts tab and press Ctrl +
Space
to access them.

Connections

Outgoing links (from this component to another):

Row: Main

Trigger: Run if; On Component Ok;
On Component Error; On Subjob Ok; On Subjob Error.

Incoming links (from one component to this one):

Row: Main; Iterate

Trigger: Run if; On Component Ok;
On Component Error; On Subjob Ok; On Subjob Error.

For further information regarding connections, see

Talend Studio User
Guide
.

Limitation

The component use is optimized for Unix-like systems.

Displaying remote system information via SSH

The following use case describes a basic Job that uses SSH command to display the
hostname of the distant server being connected to, and the current date on this remote
system.

The tSSH component is sufficient for this Job. Drop
it from the Palette to the design workspace.

Double-click on the tSSH component and select the
Basic settings view tab.

tSSH_1.png

Procedure

  1. Type in the name of the Host to be accessed
    through SSH as well as the Port number.
  2. Fill in the User identification name on the
    remote machine.
  3. Select the Authentication method on the list.
    For this use case, the authentication method used is the public key.
  4. Thus fill in the corresponding Private
    key
    .
  5. On the Command field, type in the following
    command. For this use case, type in hostname; date between double
    quotes.
  6. Select the Use timeout check box and set the
    time before falling in error to 5 seconds.

    tSSH_2.png

The remote machine returns the host name and the current date and time as defined on
its system.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x