psm dbcs add-ssh-public-key

Add an SSH public key to the opc and oracle users on all compute nodes of anOracle Database Classic Cloud Service instance.

Syntax

In the following syntax, line breaks have been added for clarity. Do not include them when entering the command.

psm dbcs add-ssh-public-key 
  -s|--service-name instance-name 
  -c|--credential-name vmspublickey 
  -k|--public-key public-key-value
  [-of|--output-format json|html|short]

Parameters

Parameter Description

-s|--service-name instance-name

Specifies the name of the instance.

-c|--credential-name vmspublickey

Indicates that the credential you are affecting is the public key on VMs (compute nodes).

-k|--public-key public-key-value

Specifies the public key value.

-of|--output-format json|html|short

(Optional) Specifies the output format of the command’s response:

  • json—output is formatted as a JSON array.

  • html—output is formatted as HTML

  • short—output is formatted as a brief summary.

The default output format is the one you specified when using the psm setup command to configure the psm CLI.

Examples

The following example adds an SSH public key to the db12c-eeep Database Classic Cloud Service instance.

Note that the actual public key value has been truncated in this example.

$ psm dbcs add-ssh-public-key \
--service-name db12c-eeep \
--credential-name vmspublickey \
--public-key "ssh-rsa AAAAB3NzaC1y..."