HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_beta_cloud-shell_ssh.1
.TH "GCLOUD_BETA_CLOUD\-SHELL_SSH" 1



.SH "NAME"
.HP
gcloud beta cloud\-shell ssh \- allows you to establish an interactive SSH session with Cloud Shell



.SH "SYNOPSIS"
.HP
\f5gcloud beta cloud\-shell ssh\fR [\fB\-\-authorize\-session\fR] [\fB\-\-command\fR=\fICOMMAND\fR] [\fB\-\-dry\-run\fR] [\fB\-\-force\-key\-file\-overwrite\fR] [\fB\-\-ssh\-flag\fR=\fISSH_FLAG\fR] [\fB\-\-ssh\-key\-file\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(BETA)\fR \fBgcloud beta cloud\-shell ssh\fR lets you remotely log in to
Cloud Shell. If your Cloud Shell is not currently running, this will cause it to
be started before establishing the SSH session.



.SH "EXAMPLES"

To SSH into your Cloud Shell, run:

.RS 2m
$ gcloud beta cloud\-shell ssh
.RE

To run a remote command in your Cloud Shell, run:

.RS 2m
$ gcloud beta cloud\-shell ssh \-\-command=ls
.RE



.SH "FLAGS"

.RS 2m
.TP 2m
\fB\-\-authorize\-session\fR

If provided, sends OAuth credentials to the current Cloud Shell session on
behalf of the user. When this completes, the session will be authorized to run
various Google Cloud command\-line tools without requiring the user to manually
authenticate.

.TP 2m
\fB\-\-command\fR=\fICOMMAND\fR

A command to run in Cloud Shell.

Runs the command in Cloud Shell and then exits.

.TP 2m
\fB\-\-dry\-run\fR

If provided, prints the command that would be run to standard out instead of
executing it.

.TP 2m
\fB\-\-force\-key\-file\-overwrite\fR

If enabled gcloud will regenerate and overwrite the files associated with a
broken SSH key without asking for confirmation in both interactive and
non\-interactive environment.

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.

.TP 2m
\fB\-\-ssh\-flag\fR=\fISSH_FLAG\fR

Additional flags to be passed to \fBssh(1)\fR.

.TP 2m
\fB\-\-ssh\-key\-file\fR

The path to the SSH key file. By default, this is
\fB~/.ssh/google_compute_engine\fR.


.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-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 \fB$ gcloud help\fR for details.



.SH "NOTES"

This command is currently in beta and might change without notice. These
variants are also available:

.RS 2m
$ gcloud cloud\-shell ssh
.RE

.RS 2m
$ gcloud alpha cloud\-shell ssh
.RE