setremoteconnection command

Ops Center Automator User Guide

Version
10.8.x
File Size
3.6 MB
Audience
anonymous
Part Number
MK-99AUT001-14

The setremoteconnection command adds or updates agentless connection-destination definitions in Ops Center Automator through a CSV file.

Function

The setremoteconnection command adds or updates agentless connection-destination definitions in Ops Center Automator. To add or update agentless connection-destination definitions, you define the information in a CSV file and then specify the file name as a command argument.

Note: The CSV file must have the same format as the output file of the listremoteconnections command.

Syntax:

setremoteconnection {/file Input File  
[/user UserName | /user UserName /passwordfile PasswordFile]
 [/authmode local | external]| /help} 
Note: You are prompted to enter the password in interactive mode if you do not specify the passwordfile option.

Permission

  • Ops Center Automator users must have Administrator permissions (members of the OS Administrators group) to run the setremoteconnection command.
  • If a user without the necessary permissions runs the command, the system generates the following message:

KNAE03226-W The user does not have permission to execute the command.

Options

Option Description
/file Specifies the path of the file that contains the agentless connection-destination definitions to add or update. If the specified file does not exist, the system generates an error. Both absolute and relative paths are allowed.
/user Specifies the name of the user running the command. The user name must be between 1 and 256 characters in length and consist of single-byte alphanumeric characters including ( ! # $ % & ' ( ) * + - . = @ \ ^ _ |). The user name is case sensitive.
/passwordfile Specifies a password file (with an absolute or relative path) that includes the encrypted user credentials for the specified user.
/authmode local | external Specify the authentication type, either local or external. Specify local to authenticate locally with Automator. Specify external to authenticate with Common Services. If this option is not specified, Ops Center Automator operates in the authentication mode specified by the command.auth.mode of command_user.properties.

Storage destination

installation-folder\bin

Return codes

The following table lists the setremoteconnection command return codes and descriptions:

Return code Description
0 The command succeeded.
1 The argument is not valid.
2 The command stopped.
3 The service status is not valid.
4 An exclusion error occurred.
5 Communication failed.
6 Authentication failed.
7 A path is specified that is not valid.
9 Path not found.
10 Path cannot be accessed.
14 User does not have permission to run the command.
17 The interactive input value is not valid.
230 Format of the agentless connection-destination definition is not valid.
231 Registration of some of the agentless connection-destination definitions failed.
232 Registration of all of the agentless connection-destination definitions failed.
255 The command stopped because of an error not in this table.

File format

The agentless connection-destination definition file that you specify for the /file option uses the same basic format that is used in the output generated by the listremoteconnections command.

The agentless connection-destination definition file differs depending on the environment as follows:

  • In a Windows-based OS environment: Uses character encoding MS932 and line feed code CR+LF.
  • In a Linux OS environment: Uses the character encoding that is specified for the user's LANG environment variable and uses the line feed code LF.
Data item Description
Definition ID

(Id)

Specifies the ID of the agentless connection-destination definition to update. If a null character is specified, the agentless connection-destination definitions are registered as an addition. If the agentless connection-destination definition of the specified ID does not exist, the system generates an error.
Connection destination type

(Method)

Specifies any of the following connection destination types:
  • IPv4: The connection destination is an IP address in IPv4 format.
  • IPv6: The connection destination is an IP address in IPv6 format.
  • HostName: The connection destination is a host name.
Connection destination

(IP Address/Host Name)

Specifies the IP address or host name of the connection-destination host.
Service resource group

(Service Group)

Specifies the service group to allocate to the agentless connection-destination definition.

Note: This parameter is ignored from v8.5.1 onward because agentless connection settings are allocated to infrastructure groups.

Authentication information

(Authentication)

Specifies whether to set authentication information:
  • Enable: Authentication information is set.
  • Disable: Authentication information is not set.

When the system displays the message "Authentication information is not set," any additional data is ignored. However, the data item is still required.

Protocol

(Protocol)

Specifies one of the following protocols:
  • Windows: Connect using a Windows-based OS.
  • SSH: Connect using SSH.
  • Telnet: Connect using Telnet.
SSH authentication method

(SSH Authentication Method)

Specifies the SSH authentication method:
  • When the protocol is not SSH, specify a null character ("").
  • When the protocol is SSH, one of the following:
    • Password Authentication (PW)
    • Public Key Authentication (PK)
    • Keyboard Interactive Authentication (KI)
User ID

(User ID)

Specifies the User ID used to log on to the connection-destination host when the protocol is Windows or SSH. This parameter is required.
Password

(Password)

Specifies the password of the user ID used to log on to the connection-destination host. This parameter is required in some cases and not in others as follows:

Case 1: When no definition ID is specified (when adding a definition).

  • In a Windows-based OS, the parameter is required.
  • When the protocol is SSH the SSH authentication method is not "public key authentication", this parameter is required.

    Note: You cannot specify "********" as a password. The system generates an error if you specify this password.

Case 2: A definition ID is specified (when updating a definition).

  • In a Windows-based OS, the parameter is required.
  • When the protocol is SSH the SSH authentication method is not "public key authentication", this parameter is required.

    Note: If you specify "********" for the password, the password is not changed. If you specify a null character (“”) for the password, the password is deleted.

Super user's password

(Super User's Password)

Specifies the password of a super user of the connection-destination host. When the protocol is SSH or Telnet, this parameter is optional.
  • If you specify a string that is not "********" for the password, the specified string is set as the password.
  • If you specify "********" for the password, the password is not changed.
  • If you specify a null character (“”) for the password, the password is deleted.
Status

(Connection Status)

Specifies either Connection Successful, Error, Unknown, or "-" depending on the status.
Last connection time

(Connected Time)

Specifies the last connection time.

Behavior of the setremoteconnections command

The following lists includes details about the behavior of the setremoteconnections command when specifying an agentless connection-destination definition file for the /file option:

  • The first line of the file is the header section output by the setremoteconnections command and is ignored unconditionally. The second and subsequent lines are treated as agentless connection-destination definitions.
  • When you specify two or more agentless connection-destination definitions in the file, a single syntax error in either definition causes the command to end with an error, and no agentless connection-destination definitions are registered.
  • The values of the data items output by the listremoteconnections command in CSV format are enclosed in double quotation marks ("). However, if the values are not enclosed by double quotation marks, they are not treated as errors. (This is because when you edit a CSV file in Excel, double quotation marks are removed).
  • If the value of the first data item (ID) of an agentless connection-destination definition is a null character, the specified content is added as an agentless connection-destination definition.
  • If a value is specified for the first data item (ID) of an agentless connection-destination definition, the agentless connection-destination definition corresponding to the specified ID is updated with the content specified in the line. If the agentless connection destination definition corresponding to the specified ID does not exist, the system generates an error.
  • When two or more agentless connection-destination definitions are specified in a file and the addition or update portion of the definitions fails, the command results are as follows:

    - A return value (warning, not error) is used to report a definition that was not successfully registered.

    - Information is output as a standard error, which enables you to identify the definition that was not successfully registered.

    - The registration processing continues for all remaining definitions, even if an error occurs.

Usage example: Register or update the agentless connection-destination definitions in Ops Center Automator with the content of a specified file

setremoteconnection /file bbbbb /user xxxxx

Example: Successful registration of agentless connection-destination definition

KNAE03000-I The setremoteconnection command will now start.
KNAE03002-E The remote connection definition was registered (ID:12345, line number: 12345).

Example: Unsuccessful registration or update

KNAE03000-I The setremoteconnection command will now start.
KNAE03002-E The setremoteconnection command ended abnormally (12345).

Example: Error encountered in parameters

KNAE03000-I The setremoteconnection command will now start.
KNAE03333-E A required parameter was not found (parameter name: XXXXX, line number: 12345). Specify the required parameter, and then try again.
KNAE03334-E Unnecessary parameter has been specified (parameter name: XXXXX, line number: 12345). Delete the specified parameters, and then try again.
KNAE03002-E The setremoteconnection command ended abnormally (12345).