Deleting a Keypair

You can delete a specified keypair. This action deletes the public key stored by 3DS OUTSCALE.

Deleting a keypair does not delete the private key stored on your computer, and does not remove the public key from the metadata of virtual machines (VMs) for which the keypair is used. You cannot use the deleted keypair to create a new VM. However, you can continue to connect to other VMs already created with that keypair, as long as you can provide the private key.

Deleting a Keypair Using Cockpit v2

  1. In the Keypairs dashboard, check the box of the keypair you want to delete.
    The keypair is selected.

  2. Click IconTerminate Delete.
    A confirmation dialog box appears.

  3. Click Delete.
    The keypair is deleted.

Deleting a Keypair Using OSC CLI

The DeleteKeypair command deletes the specified keypair.
This action deletes the public key stored by 3DS OUTSCALE, thus deleting the keypair.

Request sample
$ osc-cli api DeleteKeypair --profile "default" \
    --KeypairName "keypair-example"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • KeypairName: The name of the keypair you want to delete.

The DeleteKeypair command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting a Keypair Using oapi-cli

The DeleteKeypair command deletes the specified keypair.
This action deletes the public key stored by 3DS OUTSCALE, thus deleting the keypair.

Request sample
$ oapi-cli --profile "default" DeleteKeypair \
    --KeypairName "keypair-example"

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • KeypairName: The name of the keypair you want to delete.

The DeleteKeypair command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Deleting a Keypair Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To delete a keypair, use the delete-key-pair command following this syntax:

Request sample
$ aws ec2 delete-key-pair \
    --profile YOUR_PROFILE \
    --key-name MyKeyPair \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • key-name: The name of the keypair you want to delete.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The public key of the specified keypair is deleted.

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.