ec2-describe-keypairs

Description

Returns information about key pairs available to you. If you specify key pairs, information about those key pairs is returned. Otherwise, information for all registered key pairs is returned.

Syntax

ec2-describe-keypairs [key_id ...]

Options

NameDescriptionRequired

key_id

Key pair to describe.

Type: String

Default: Describes all key pairs available to the account.

Example: gsg-keypair

No

Output

The command returns a table that contains the following information:

  • KEYPAIR identifier

  • Key pair identifier

  • Private key fingerprint

Amazon EC2 displays errors on stderr.

Examples

Example Request

This example describes the state of the gsg-keypair key.

PROMPT> ec2-describe-keypairs gsg-keypair
KEYPAIR gsg-keypair1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f