gcloud beta compute users add-keys

NAME
gcloud beta compute users add-keys - add public keys to a Google Compute Engine user
SYNOPSIS
gcloud beta compute users add-keys [NAME] --public-key-files=LOCAL_FILE_PATH,[LOCAL_FILE_PATH,…] [--description=DESCRIPTION] [--expire=EXPIRE] [GCLOUD_WIDE_FLAG …]
DESCRIPTION
(BETA) gcloud beta compute users add-keys adds public keys to a Google Compute Engine user.
POSITIONAL ARGUMENTS
[NAME]
If provided, the name of the user to add a public key to. Else, the default user will be used. The default username is mapped from the email address of the authenticated account. Please run:
  $ gcloud config set account ACCOUNT

to change the authenticated account.

REQUIRED FLAGS
--public-key-files=LOCAL_FILE_PATH,[LOCAL_FILE_PATH,…]
The path to a public-key file.
OPTIONAL FLAGS
--description=DESCRIPTION
A description of the public keys
--expire=EXPIRE
Public keys can be configured to expire after a specified amount of time. For example, specifying 12h will cause the key to expire after 12 hours. See $ gcloud topic datetimes for information on duration formats.
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
EXAMPLES
To add a public key to a user, run:
  $ gcloud beta compute users add-keys example-user \
      --public-key-files ~/.ssh/pubkey.pub

Multiple public keys can be specified by providing multiple paths to key files on the local machine.

NOTES
This command is currently in BETA and may change without notice. This variant is also available:
  $ gcloud alpha compute users add-keys
Was this page helpful? Let us know how we did:

Send feedback about...