PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

Terminal emulator package guide

Version 2.14.1. Installed versions can differ. Examples are illustrative and not tested.

Jump to actions

Packages

Prerequisites

Use an SSH or Telnet text terminal service that the Device can reach. No desktop terminal or browser is used. IBM 3270 and 5250 are not supported. SSH signs in with a password; private keys are not supported. Telnet is not encrypted and does not sign in with the Credential: answer the host's login prompts with Send text.

Connect with Session name=Default, Terminal type=SSH, Host=terminal.example.com, Port (0 for the protocol default)=0, Timeout (seconds)=30, and a Credential variable for a test account. Enter the server's SHA-256 fingerprint from your administrator. If blank, the first key seen for that host and port is trusted and kept (SFTP uses the same list), and a later change is refused before the password is sent. If the stored key list is damaged, Connect fails. Use another session name for a second connection, and Disconnect when you finish.

Later actions need an open session in the same Run. Text is sent and received as UTF-8. All received text collects in one buffer. Get screen text returns it as raw text, not a screen layout, and can include prompts, echoed input and control codes.

The examples use a test service that writes Ready> , then answers the line sample with Received sample. Other hosts give their own output. Before you read a reply, use Wait for text. It searches the whole buffer, case-sensitive, so an old prompt or echo can match. Use Get screen text with Clear=true to empty the buffer first. New text can arrive at any time. The Connect timeout applies only to SSH; Wait for text has its own timeout for both protocols.

Shared fields

Every action uses this field.

IDFieldType; default; requirementValue
sessionSession nameStringdefault DefaultOptional.Connect gives the session this local name, for example Default⁠; later actions use it. It is not an account, a server or a Credential. An action with a session name that is not open fails.

Actions

There are no conditions.

Connect (terminalEmulatorConnect)

Open an SSH or Telnet session for later text actions.

Inputs

Also uses the shared fields.

IDFieldType; default; requirementValue
terminalTypeTerminal typeTerminalTypedefault SSHOptional.SSH⁠: shell with password sign-in. TELNET⁠: not encrypted, no sign-in with the Credential. Choices: SSH⁠, TELNET⁠.
hostHostStringdefault emptyRequired.Host name without a scheme, such as terminal.example.com⁠. Outer spaces are removed; empty fails.
portPort (0 for the protocol default)Numberdefault 0Optional.0 uses SSH 22 or Telnet 23; other ports: 1 through 65535. A negative value also uses the default; prefer 0.
credentialCredentialsCredentialdefault emptyOptional.SSH: Credential with a username (not empty) and the account password. Telnet ignores it.
timeoutTimeout (seconds)Numberdefault 30Optional.SSH connection timeout in whole seconds, at least 1⁠. Telnet checks the value but does not use it.
expectedHostKeyFingerprintExpected SSH host key fingerprint (SHA-256)Stringdefault emptyOptional. Shown when terminalType=SSH⁠.SSH: SHA-256 fingerprint from your administrator, with or without SHA256: and trailing =⁠. Blank trusts the first key (see Prerequisites). Telnet ignores it.

Outputs

IDTypeResult
sessionNameStringThe Session name, normally Default⁠. You can bind it to a String or use the name itself in later actions.

Example

Use the SSH settings in Prerequisites. Bind Create terminal session to String terminalSession. For Telnet, set Terminal type=TELNET and its port, and answer any login prompt with Send text.

Expected result

terminalSession is Default. The Ready> prompt can arrive later: use Wait for text. A bad host or port, a failed SSH sign-in or a refused host key fails, and no session is stored.

Back to actions

Disconnect (terminalEmulatorDisconnect)

Close and remove the session.

Inputs

Uses the shared fields.

Outputs

None.

Example

At the end, set Session name=Default.

Expected result

The connection closes. Later actions with Default fail until Connect runs again.

Back to actions

Get screen text (terminalEmulatorGetText)

Read the received-text buffer and, if you want, clear it for the next exchange.

Inputs

Also uses the shared fields.

IDFieldType; default; requirementValue
clearClear the buffer afterwardsBooleandefault falseOptional.False keeps the buffer. True returns its text, then clears it; text that arrives later stays for later actions.

Outputs

IDTypeResult
resultStringAll buffered text, possibly empty, including earlier replies.

Example

After Wait for text finds Received sample, set Session name=Default, Clear the buffer afterwards=true; bind result to String terminalText.

Expected result

terminalText includes Received sample and any earlier prompts or echoes. A read right after is empty if nothing new arrived. Clear does not change terminalText or remove control codes from it.

Back to actions

Send text (terminalEmulatorSendText)

Send text to an open terminal, with Enter if you want. It does not wait for a reply.

Inputs

Also uses the shared fields.

IDFieldType; default; requirementValue
textTextStringdefault emptyRequired.Exact text to send, such as sample⁠.
pressEnterPress Enter afterwardsBooleandefault trueOptional.True adds carriage return and line feed (\r\n). False sends only Text, for partial input.

Outputs

None.

Example

After Wait for text finds Ready> , set Session name=Default, Text=sample, Press Enter afterwards=true. Then use Wait for text with Text=Received sample.

Expected result

The host gets sample and a line break, and the test service answers Received sample later. A closed connection can fail. No command exit code is returned.

Back to actions

Wait for text (terminalEmulatorWaitForText)

Wait until the exact text is anywhere in the buffer, or fail when the time runs out. The buffer is kept.

Inputs

Also uses the shared fields.

IDFieldType; default; requirementValue
textTextStringdefault emptyRequired.Exact text, not empty, case-sensitive, such as Received sample⁠. Matches anywhere in the buffer; no regular expressions.
timeoutTimeout (seconds)Numberdefault 30Optional.Longest wait in whole seconds, at least 1⁠, such as 10⁠. Applies to SSH and Telnet.

Outputs

None.

Example

After you send sample, set Session name=Default, Text=Received sample, Timeout (seconds)=10. If an earlier reply could match, clear the buffer before the exchange.

Expected result

The step continues when Received sample is found. received sample does not match. Text already in the buffer matches at once. If the text is not there after 10 seconds, the step fails (there is no true or false output).

Back to actions