Telnet Connector
This adapter connects to servers via the Teletype Network Protocol
Properties
Operation | Operation performed by the adapter Possible values: |
Parameters
Adapter | Adapter main class (do not change!) Possible values: |
host | Required parameter: Host of the server to which the connection is to be established Possible values:
|
port | Port of the server to which the connection is to be established Possible values:
|
user | User name for the Telnet connection Possible values: String with the user name, e.g. |
password | Password for the Telnet connection Possible values: String with the Password, e.g. |
timeout | Connection timeout in milliseconds Possible values:
|
responseDelay | Response delay in milliseconds Possible values:
|
cleanAnsiVTSequences | Specify whether the output should contain ANSI VT characters or not Possible values:
|
Status values
1 | The adapter operation was successfully executed |
-1 | An error occurred during the execution of the adapterThe adapter operation was executed successfully |
Input
When connecting via Telnet, the adapter uses labels within the login
: and password
: credentials by default. However, if you want to connect to a machine that has different access labels, these can be configured in the input XML via the <Configuration>
node.
The Telnet Connector expects the following input structure:
Input
<Telnet> <!-- Any root name respecting XML naming rules -->
<!-- Optional attributes. If ignored, the default patterns will be used. -->
<Configuration loginLabel="Username: " passwordLabel="Password: "/>
<Commands>
<Command value="ls -ll" />
<Command value="mkdir /home/luis/myNewFolder"/>
<Command value="touch /home/luis/myNewFolder/aNewEmptyFile.txt"/>
<Command value="ls -ll"/>
</Commands>
<!-- Any number of Command nodes, which will be executed in the same connection -->
</Telnet>
Explanation:
Telnet:
Root nodeConfiguration:
Node with the same content as specified in the input. Although the node is required, theloginLabel
andpasswordLabel
attributes are optional.Commands
: node that includes all commands usedCommand
: Any number ofcommand
nodes with avalue
attribute containing the commands to be executed.
Output
The Telnet Connector outputs an XML structure similar to the following output:
Output
<Telnet>
<LoginResult>Successful</LoginResult>
<Configuration loginLabel="Username: " passwordLabel="Password: "/>
<Commands>
<Command value="ls -ll">total 52
-rw-rw-r-- 1 ivan ivan 555 feb 24 15:30 a.txt
drwxr-xr-x 2 ivan ivan 4096 feb 20 12:59 Desktop
drwxr-xr-x 2 ivan ivan 4096 feb 20 12:59 Documents
drwxr-xr-x 2 ivan ivan 4096 feb 20 12:59 Downloads
-rw-r--r-- 1 ivan ivan 8980 feb 20 12:45 examples.desktop
drwxrwxr-x 2 ivan ivan 4096 feb 21 14:54 mio
drwxr-xr-x 2 ivan ivan 4096 feb 20 12:59 Music
drwxr-xr-x 2 ivan ivan 4096 feb 20 12:59 Pictures
drwxr-xr-x 2 ivan ivan 4096 feb 20 12:59 Public
drwxr-xr-x 2 ivan ivan 4096 feb 20 12:59 Templates
drwxr-xr-x 2 ivan ivan 4096 feb 20 12:59 Videos
$
</Command>
</Commands>
<!-- Command node containing the value (response) for each Command node available in the input file -->
</Telnet>
Explanation:
Telnet
: Root nodeLoginResult
: Information about the login result. The value of the node is eitherFailed
orSuccessful
.Configuration
: Node with the same content as specified in the input.Commands
: node that includes all commands usedCommand
: Any number ofcommand
nodes with avalue
attribute containing the commands to be executed. The content of this node is the result of the command issued by the Telnet server.