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/current/help/man/man1/gcloud_alpha_compute_diagnose_routes.1
.TH "GCLOUD_ALPHA_COMPUTE_DIAGNOSE_ROUTES" 1



.SH "NAME"
.HP
gcloud alpha compute diagnose routes \- routes to/from Compute Engine virtual machine instances



.SH "SYNOPSIS"
.HP
\f5gcloud alpha compute diagnose routes\fR [\fINAME\fR\ ...] [\fB\-\-container\fR=\fICONTAINER\fR] [\fB\-\-dry\-run\fR] [\fB\-\-external\-route\-ip\fR=\fIEXTERNAL_ROUTE_IP\fR] [\fB\-\-force\-key\-file\-overwrite\fR] [\fB\-\-plain\fR] [\fB\-\-regexp\fR=\fIREGEXP\fR,\ \fB\-r\fR\ \fIREGEXP\fR] [\fB\-\-reverse\-traceroute\fR] [\fB\-\-ssh\-flag\fR=\fISSH_FLAG\fR] [\fB\-\-ssh\-key\-file\fR=\fISSH_KEY_FILE\fR] [\fB\-\-strict\-host\-key\-checking\fR=\fISTRICT_HOST_KEY_CHECKING\fR] [\fB\-\-user\fR=\fIUSER\fR] [\fB\-\-zones\fR=\fIZONE\fR,[\fIZONE\fR,...]] [\fB\-\-ssh\-key\-expiration\fR=\fISSH_KEY_EXPIRATION\fR\ |\ \fB\-\-ssh\-key\-expire\-after\fR=\fISSH_KEY_EXPIRE_AFTER\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR] [\-\-\ \fITRACEROUTE_ARGS\fR\ ...]



.SH "DESCRIPTION"

\fB(ALPHA)\fR Routes to/from Compute Engine virtual machine instances.

NOTE: The name filtering will cycle through all the VMs in the project.
Depending on the size of the project, this could be a considerable amount of
work.

If that is the case, use the \-\-regexp flag to filter down the amount of VMs
considered in the filtering.



.SH "EXAMPLES"

To route to/from Compute Engine virtual machine instances, run:

.RS 2m
$ gcloud alpha compute diagnose routes
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
[\fINAME\fR ...]

If provided, show details for the specified names and/or URIs of resources.

.TP 2m
[\-\- \fITRACEROUTE_ARGS\fR ...]

Flags and positionals passed to the underlying traceroute call.


The '\-\-' argument must be specified between gcloud specific args on the left
and TRACEROUTE_ARGS on the right. Example:

.RS 2m
$ gcloud alpha compute diagnose routes example\-instance \-\- \-w 0.5 \e
\-q 5 42
.RE


.RE
.sp

.SH "FLAGS"

.RS 2m
.TP 2m
\fB\-\-container\fR=\fICONTAINER\fR

The name or ID of a container inside of the virtual machine instance to connect
to. This only applies to virtual machines that are using a Container\-Optimized
OS virtual machine image. For more information, see
https://cloud.google.com/compute/docs/containers

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

Print the equivalent scp/ssh command that would be run to stdout, instead of
executing it.

.TP 2m
\fB\-\-external\-route\-ip\fR=\fIEXTERNAL_ROUTE_IP\fR

For reverse traceroute, this will be the ip given to the VM instance to
traceroute to. This will override all obtained ips.

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

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

If disabled, the files associated with a broken SSH key will not be regenerated
and will fail in both interactive and non\-interactive environments.

.TP 2m
\fB\-\-plain\fR

Suppress the automatic addition of \fBssh(1)\fR/\fBscp(1)\fR flags. This flag is
useful if you want to take care of authentication yourself or use specific
ssh/scp features.

.TP 2m
\fB\-\-regexp\fR=\fIREGEXP\fR, \fB\-r\fR \fIREGEXP\fR

Regular expression to filter the names of the results on. Any names that do not
match the entire regular expression will be filtered out.

.TP 2m
\fB\-\-reverse\-traceroute\fR

If enabled, will also run traceroute from the VM to the host

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

Additional flags to be passed to \fBssh(1)\fR. It is recommended that flags be
passed using an assignment operator and quotes. This flag will replace
occurences of \f5\fI%USER%\fR\fR and \f5\fI%INSTANCE%\fR\fR with their
dereferenced values. Example:

.RS 2m
$ gcloud alpha compute diagnose routes example\-instance \e
    \-\-zone us\-central1\-a           \-\-ssh\-flag="\-vvv" \e
    \-\-ssh\-flag="\-L 80:%INSTANCE%:80"
.RE

is equivalent to passing the flags \f5\fI\-\-vvv\fR\fR and \f5\fI\-L
80:162.222.181.197:80\fR\fR to \fBssh(1)\fR if the external IP address of
\'example\-instance' is 162.222.181.197.

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

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

.TP 2m
\fB\-\-strict\-host\-key\-checking\fR=\fISTRICT_HOST_KEY_CHECKING\fR

Override the default behavior of StrictHostKeyChecking for the connection. By
default, StrictHostKeyChecking is set to 'no' the first time you connect to an
instance, and will be set to 'yes' for all subsequent connections.
\fISTRICT_HOST_KEY_CHECKING\fR must be one of: \fByes\fR, \fBno\fR, \fBask\fR.

.TP 2m
\fB\-\-user\fR=\fIUSER\fR

User for login to the selected VMs. If not specified, the default user will be
used.

.TP 2m
\fB\-\-zones\fR=\fIZONE\fR,[\fIZONE\fR,...]

If provided, only resources from the given zones are queried.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-ssh\-key\-expiration\fR=\fISSH_KEY_EXPIRATION\fR

The time when the ssh key will be valid until, such as
"2017\-08\-29T18:52:51.142Z." This is only valid if the instance is not using OS
Login. See $ gcloud topic datetimes for information on time formats.

.TP 2m
\fB\-\-ssh\-key\-expire\-after\fR=\fISSH_KEY_EXPIRE_AFTER\fR

The maximum length of time an SSH key is valid for once created and installed,
e.g. 2m for 2 minutes. See $ gcloud topic datetimes for information on duration
formats.


.RE
.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 alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:

.RS 2m
$ gcloud compute diagnose routes
.RE

.RS 2m
$ gcloud beta compute diagnose routes
.RE