Start Telnet Connection
Verb: startTelnet
Available from: <Enterprise>
Initiates a connection using the Telnet protocol to a remote server, according to previously defined settings such as: server, user, password and port.
Syntax
startTelnet --host(String) --username(String) [--password(String)] [--port(Numeric)] [--timeout(TimeSpan)] (TelnetSession)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--host | Server | Required | Text | Host address of the Telnet server. |
--username | User Name | Required | Text | Username for accessing the server. |
--password | Password | Optional | Text | Password to access the server. |
--port | Port | Optional | Number | Port number connecting to the host address of the Telnet server.
If no information is entered, the standard port "23" is used. |
--timeout | Timeout | Optional | Time Span, Number, Text | Waiting time for the command to execute.
If no value is defined in the parameter of type timeout, the execution uses the time defined by the Set Timeout command. If the script does not use this command, the default time is 5 seconds. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Telnet Connection | Telnet Session | Returns the connection established with the Telnet server. |
Example
The Start Telnet Connection command initiates a Telnet connection. Then, the Command parameter is defined as "status" within the request, using the Run Telnet Command command. Finally, the Terminate Telnet Connection command closes the connection.
defVar --name telnetConnection --type TelnetSession
defVar --name text --type String
// Connection to Telnet server established.
startTelnet --host "125.64.124.77" --username "User Name" --password Password --port 23 --timeout 00:00:05 telnetConnection=value
executeTelnet --client ${telnetConnection} --command status --timeout 00:00:12 text=value
closeTelnet --client ${telnetConnection}
// The example above demonstrates the connection to a specified Telnet server to send commands. All host, port and connection data are for example only, requiring the client services and Telnet server to be installed.