Chapter 45. keypair


This chapter describes the commands under the keypair command.

45.1. keypair create

Create new public or private key for server ssh access

Usage:

openstack keypair create [-h] [-f {json,shell,table,value,yaml}]
                                [-c COLUMN] [--noindent] [--prefix PREFIX]
                                [--max-width <integer>] [--fit-width]
                                [--print-empty]
                                [--public-key <file> | --private-key <file>]
                                [--type <type>] [--user <user>]
                                [--user-domain <user-domain>]
                                <name>

Table 45.1. Positional arguments
ValueSummary

<name>

New public or private key name

Table 45.2. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--public-key <file>

Filename for public key to add. if not used, creates a private key.

--private-key <file>

Filename for private key to save. if not used, print private key in console.

--type <type>

Keypair type. can be ssh or x509. (supported by api versions 2.2 - 2.latest)

--user <user>

The owner of the keypair. (admin only) (name or id). Requires ``--os-compute-api-version`` 2.10 or greater.

--user-domain <user-domain>

Domain the user belongs to (name or id). this can be used in case collisions between user names exist.

Table 45.3. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

Table 45.4. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 45.5. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 45.6. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

45.2. keypair delete

Delete public or private key(s)

Usage:

openstack keypair delete [-h] [--user <user>]
                                [--user-domain <user-domain>]
                                <key> [<key> ...]

Table 45.7. Positional arguments
ValueSummary

<key>

Name of key(s) to delete (name only)

Table 45.8. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--user <user>

The owner of the keypair. (admin only) (name or id). Requires ``--os-compute-api-version`` 2.10 or greater.

--user-domain <user-domain>

Domain the user belongs to (name or id). this can be used in case collisions between user names exist.

45.3. keypair list

List key fingerprints

Usage:

openstack keypair list [-h] [-f {csv,json,table,value,yaml}]
                              [-c COLUMN]
                              [--quote {all,minimal,none,nonnumeric}]
                              [--noindent] [--max-width <integer>]
                              [--fit-width] [--print-empty]
                              [--sort-column SORT_COLUMN]
                              [--sort-ascending | --sort-descending]
                              [--user <user>] [--user-domain <user-domain>]
                              [--project <project>]
                              [--project-domain <project-domain>]
                              [--marker MARKER] [--limit LIMIT]

Table 45.9. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--user <user>

Show keypairs for another user (admin only) (name or ID). Requires ``--os-compute-api-version`` 2.10 or greater.

--user-domain <user-domain>

Domain the user belongs to (name or id). this can be used in case collisions between user names exist.

--project <project>

Show keypairs for all users associated with project (admin only) (name or ID). Requires ``--os-compute- api-version`` 2.10 or greater.

--project-domain <project-domain>

Domain the project belongs to (name or id). this can be used in case collisions between project names exist.

--marker MARKER

The last keypair id of the previous page

--limit LIMIT

Maximum number of keypairs to display

Table 45.10. Output formatter options
ValueSummary

-f {csv,json,table,value,yaml}, --format {csv,json,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

--sort-column SORT_COLUMN

Specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated

--sort-ascending

Sort the column(s) in ascending order

--sort-descending

Sort the column(s) in descending order

Table 45.11. CSV formatter options
ValueSummary

--quote {all,minimal,none,nonnumeric}

When to include quotes, defaults to nonnumeric

Table 45.12. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 45.13. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

45.4. keypair show

Display key details

Usage:

openstack keypair show [-h] [-f {json,shell,table,value,yaml}]
                              [-c COLUMN] [--noindent] [--prefix PREFIX]
                              [--max-width <integer>] [--fit-width]
                              [--print-empty] [--public-key] [--user <user>]
                              [--user-domain <user-domain>]
                              <key>

Table 45.14. Positional arguments
ValueSummary

<key>

Public or private key to display (name only)

Table 45.15. Command arguments
ValueSummary

-h, --help

Show this help message and exit

--public-key

Show only bare public key paired with the generated key

--user <user>

The owner of the keypair. (admin only) (name or id). Requires ``--os-compute-api-version`` 2.10 or greater.

--user-domain <user-domain>

Domain the user belongs to (name or id). this can be used in case collisions between user names exist.

Table 45.16. Output formatter options
ValueSummary

-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}

The output format, defaults to table

-c COLUMN, --column COLUMN

Specify the column(s) to include, can be repeated to show multiple columns

Table 45.17. JSON formatter options
ValueSummary

--noindent

Whether to disable indenting the json

Table 45.18. Shell formatter options
ValueSummary

--prefix PREFIX

Add a prefix to all variable names

Table 45.19. Table formatter options
ValueSummary

--max-width <integer>

Maximum display width, <1 to disable. you can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.

--fit-width

Fit the table to the display width. implied if --max- width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable

--print-empty

Print empty table if there is no data to show.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.