The badly named keypair is really the public key of an OpenSSH key pair to be used for access to created servers. You can also create a private key for access to a created server by not passing any argument to the keypair create command.
Compute v2
Create new public or private key for server ssh access
openstack keypair create
[--public-key <file> | --private-key <file>]
[--type <type>]
[--user <user>]
[--user-domain <user-domain>]
<name>
Filename for public key to add. If not used, creates a private key.
Filename for private key to save. If not used, print private key in console.
Keypair type. Can be ssh or x509. (Supported by API versions ‘2.2’ - ‘2.latest’)
The owner of the keypair. (admin only) (name or ID). Requires --os-compute-api-version
2.10 or greater.
Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.
New public or private key name
Delete public or private key(s)
openstack keypair delete
[--user <user>]
[--user-domain <user-domain>]
<key>
[<key> ...]
The owner of the keypair. (admin only) (name or ID). Requires --os-compute-api-version
2.10 or greater.
Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.
Name of key(s) to delete (name only)
List key fingerprints
openstack keypair list
[--format-config-file FORMAT_CONFIG]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--user <user>]
[--user-domain <user-domain>]
[--project <project>]
[--project-domain <project-domain>]
[--marker MARKER]
[--limit LIMIT]
Config file for the dict-to-csv formatter
specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
sort the column(s) in ascending order
sort the column(s) in descending order
Show keypairs for another user (admin only) (name or ID). Requires --os-compute-api-version
2.10 or greater.
Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.
Show keypairs for all users associated with project (admin only) (name or ID). Requires --os-compute-api-version
2.10 or greater.
Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.
The last keypair ID of the previous page
Maximum number of keypairs to display
Display key details
openstack keypair show
[--public-key]
[--user <user>]
[--user-domain <user-domain>]
<key>
Show only bare public key paired with the generated key
The owner of the keypair. (admin only) (name or ID). Requires --os-compute-api-version
2.10 or greater.
Domain the user belongs to (name or ID). This can be used in case collisions between user names exist.
Public or private key to display (name only)
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.