Hitachi

JP1 Version 12 JP1/Automatic Operation Command and API Reference 


1.6.10 setremoteconnection (adding or updating a connection destination definition)

Description

This command registers or updates a connection destination definition by using a connection destination definition information file (in CSV format).

Before you execute this command, execute the listremoteconnections command, and then edit the output connection destination definition information file.

Syntax

setremoteconnection
    /file connection-destination-definition-information-file-path
    /user user-ID
     {/password password | /passwordfile password-file-path}

Arguments

/file

This option specifies the absolute or relative path to the connection destination definition information file. An error occurs if the specified file does not exist.

/user

This option specifies the user ID for JP1/AO.

The number of possible characters is in the range from 1 to 256 characters.

The possible characters are half-width alphanumeric characters, !, #, $, %, &, ', (, ), *, +, -, ., =, @, \, ^, _, and |.

This option is not case sensitive.

/password

This option specifies the password of the user indicated by the user option.

You must specify either this option or the passwordfile option. If both options are specified, or if neither is specified, then you will get an error.

The number of possible characters is in the range from 1 to 256 characters.

The possible characters are the same as those for the user option.

/passwordfile

This option specifies the absolute or relative path to the password file for the user specified in the user option. You can create a password file by using the encryptpassword command.

You must specify either this option or the password option. If both options are specified, or if neither is specified, then you will get an error.

Format of the connection destination definition information file

The following table describes the format of the connection destination definition information file.

Table 1‒9: Format of the connection destination definition information file

Item

Information to be specified#1

Id

To add a connection destination definition:

Specify an empty string.

To update a connection destination definition:

Specify the ID of the connection destination definition containing information that you want to update.

Method

Specify one of the following values as the connection destination type. This item is not case sensitive.

  • IPv4

  • IPv6

  • HostName

IP Address/Host Name

Specify the IP address or host name of the host to connect to.

Service Group

Specify the service group to be assigned to the connection destination definition.

Authentication

Specify whether to set authentication information. This item is not case sensitive.

  • Enable

    Sets authentication information.

  • Disable

    Does not set authentication information.

Protocol#2

Specify the authentication protocol to be used for communication with the host to connect to. This item is not case sensitive.

  • Windows

  • SSH

  • Telnet

SSH Authentication Method#2

If you specify SSH for Protocol, specify the authentication method to be used for communication with the host to connect to. You can also use the character string enclosed in parentheses shown below to specify this item. This item is not case sensitive.

  • Password Authentication (PW)

    Password authentication

  • Public Key Authentication (PK)

    Public key authentication

  • Keyboard Interactive Authentication (KI)

    Keyboard interactive authentication

User ID#2

Specify the user ID for logging in to the host to connect to. If you specify Windows or SSH for Protocol, make sure that you also specify this item.

Password#2

Specify the password for logging in to the host to connect to. Make sure that you specify this item in the following cases:

  • When Windows is specified for Protocol

  • When Password Authentication or Keyboard Interactive Authentication is specified for SSH Authentication Method

In addition, the command works as follows depending on whether a value is specified for Id:

When no value is specified for Id:
  • If you specify ******** for Password, an error occurs.

When a value is specified for Id:
  • If you specify ******** for Password, the password is not changed.

  • If you specify an empty character for Password, the password is deleted.

Superuser's Password#2

Specify the password for the superuser of the host to connect to. Specify this item when SSH or Telnet is specified for Protocol.

Note that, if you specify ********, the password is not changed. If you specify an empty character, the password is deleted.

Connection Status

Specify the status when JP1/AO last connected to the host.

  • Connection Successful

    Connection was successful.

  • Error

    Connection failed.

  • Unknown

    Not connected

  • -

    Not applicable

Connected Time

Specify the time at which JP1/AO last connected to the host.

#1

Using a value without enclosing it in double quotation marks (") does not cause an error. However, if the value contains any double quotation mark ("), escape the mark with another one added in front of the mark.

#2

If you specify Disable for Authentication, specify an empty string.

Located in

In Windows:

JP1/AO-installation-folder\bin

In Linux:

/opt/jp1ao/bin

Execute permission

Execute the command as a user with both Administrator or root permissions for the OS and with the Admin role for JP1/AO. If a user without Administrator or root permissions executes the command, a message appears asking the user to elevate the permission level.

Return code

The following table lists the return codes from the command.

Return code

Description

0

The command succeeded.

1

The argument is invalid.

2

The command execution has been interrupted.

3

The service status is invalid.

4

One of the other commands is running.

5

Communication failed.

6

Authentication failed.

7

An invalid path is specified.

9

The specified path does not exist.

10

The specified path is not accessible.

14

You do not have permission to execute the command.

230

The information specified as the connection destination definition is invalid.

231

Registration of some connection destination definitions failed.

232

Registration of all connection destination definitions failed.

255

The command execution has been interrupted due to an error other than the above.

Example

The following example shows how to use the command to add or update, in Windows, connection destination definitions by using the information in the list01.csv file:

setremoteconnection /file list01.csv /user user01 /password pass01