Config2_SSHPublicKeyManager

Provides APIs for managing SSH public keys associated with a user.

Instances of this class are obtained from:

Methods

MethodReturnsDescription
add() Config2_PublicKeyInfo

Adds an SSH public key in OpenSSH format.

get() Config2_PublicKeyInfo

Returns the public key at the given index.

remove() void

Removes a public key at the given index.

toArray() Array.<Config2_PublicKeyInfo>

Returns an array of all public keys.

Method Details

add(key) → {Config2_PublicKeyInfo}

Description:
  • Adds an SSH public key in OpenSSH format.

Parameters:
Name Type Description
key String

SSH public key string in OpenSSH format.

Returns:

Added public key info object.

Type
Config2_PublicKeyInfo

get(index) → {Config2_PublicKeyInfo}

Description:
  • Returns the public key at the given index.

Parameters:
Name Type Description
index Number

Key index.

Returns:

Public key info object.

Type
Config2_PublicKeyInfo

remove(index)

Description:
  • Removes a public key at the given index.

Parameters:
Name Type Description
index Number

Key index.

toArray() → {Array.<Config2_PublicKeyInfo>}

Description:
  • Returns an array of all public keys.

Returns:

Array of public key info objects.

Type
Array.<Config2_PublicKeyInfo>