gcloud bms ssh-keys add SSH_KEY (--key=KEY | --key-file=KEY_FILE) [GCLOUD_WIDE_FLAG …]
my-ssh-key in
project my-project with a public key
ABC6695
gcloud bms ssh-keys add my-ssh-key --project=my-project --key=ABC6695
To add an SSH key called in
project my-ssh-key with a public key stored
in /home/user/.ssh/id_rsa.pub
my-project
gcloud bms ssh-keys add my-ssh-key --project=my-project --key-file=/home/user/.ssh/id_rsa.pub
To set the project attribute:
ssh_key on the command line with a fully
specified name;
--project on the command line;
core/project.
To set the region attribute:
ssh_key on the command line with a fully
specified name;
SSH_KEYssh_key attribute:
ssh_key on the command line.
--key=KEY--key-file=KEY_FILE--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha bms ssh-keys add
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.