Skip to content

Connect

Miriam McMahon edited this page Sep 1, 2023 · 15 revisions

Description

Connect to a remote host to establish an SSH, telnet or Tn3270 session.

Parameters

Parameter Name Description Type Resolved Type Required
ConnectionObjectName The string that identifies the connection. This should be defined as a global variable so that it can be used throughout the script String String Yes
Type The type of connection required: Valid options are: Ssh, Tn3270, Telnet String String Yes
NetworkAddress The network address of the target host Value String Yes
Port Port number. If not specified, the default port for the connection type will be used Value Integer No
Login The login name to use for the connection Value String Yes
Password The login password to use for the connection, if password authentication is required Value String No
UserKey SSH Connections only. The user's SSH public key, if SSH key authentication is required instead of password authentication Value String No
RequestTerminal SSH connections only. If true, request that a psuedo-terminal is allocated on the connection, in which case an interactive shell session is opened on the remote host. Send and Receive can be used on this connection. If false, a pseudo=terminal is not opened, and only the ExecuteCommand can be used to run a remote command on the connection. Value Boolean No
HostKey SSH connections only. The SSH host key for the remote host. This will be compared that the server's host key if CheckHost=true Value String No
AutoAdjustCiphers SSH connections only. Adjust or not the list of Ciphers when connecting to the SSH server (deprecated in 6.13) Boolean Boolean No
Timeout Timeout for the connection. If not specified, then the default value for the connection type will be applied Value Integer No
EndOfDataSuffix End of data character to use when Sending data on an interactive session. Value String No
EndOfLineSuffix End of line character character to use when sending data on an interactive session. Value String No
WorkstationId Tn3270 connections only. Specify the Workstation ID of the platform Value String No
UseSsl Tn3270 connections only. If true, use SSL encryption Value Boolean No
SkipServerCertValidation Tn3270 connections only. If true, do not validate the SSL certificate Value Boolean No
CheckHostKey SSH connections only. If true, compare the HostKey with the one provided by the remote server Value Boolean No
SoftwareVersionVariableName The name of a variable that will be used to report the remote server’s software name and version, if the remote server provides this information String String No
TerminalType SSH connections only. An optional terminal type to use for this connection on an interactive session. This parameter was added in Safeguard 2.11 String String No

Examples

Example:

{
    "Connect": {
        "ConnectionObjectName": "Global:ConnectSsh",
        "Type": "Ssh",
        "Port": "%Port%",
        "NetworkAddress": "%Address%",
        "Login": "%FuncUserName%",
        "Password": "%FuncPassword::$%",
        "UserKey": "%LoginKey::$%",
        "CheckHostKey": "%CheckHostKey%",
        "Hostkey": "%HostKey::$%",
        "RequestTerminal": true,
        "Timeout": "%Timeout%"
   }
}