- gcloud alpha cloud-shell ssh - allows you to establish an interactive SSH session with Cloud Shell
gcloud alpha cloud-shell ssh [--command=COMMAND] [--dry-run] [--force-key-file-overwrite] [--ssh-flag=SSH_FLAG] [--ssh-key-file] [GCLOUD_WIDE_FLAG ...]
(ALPHA) gcloud alpha cloud-shell ssh lets you remotely log in to
A command to run in Cloud Shell.
Runs the command in Cloud Shell and then exits.
If provided, prints the command that would be run to standard out instead of
If enabled gcloud will regenerate and overwrite the files associated with a
broken SSH key without asking for confirmation in both interactive and
If disabled gcloud will not attempt to regenerate the files associated with a broken SSH key and fail in both interactive and non-interactive environment.
Additional flags to be passed to ssh(1).
The path to the SSH key file. By default, this is
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
To SSH into your Cloud Shell, run:
- $ gcloud alpha cloud-shell ssh
To run a remote command in your Cloud Shell, run:
- $ gcloud alpha cloud-shell ssh --command=ls
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support