File: //snap/google-cloud-cli/current/help/man/man1/gcloud_alpha_workstations_ssh.1
.TH "GCLOUD_ALPHA_WORKSTATIONS_SSH" 1
.SH "NAME"
.HP
gcloud alpha workstations ssh \- SSH into a running workstation
.SH "SYNOPSIS"
.HP
\f5gcloud alpha workstations ssh\fR (\fIWORKSTATION\fR\ :\ \fB\-\-cluster\fR=\fICLUSTER\fR\ \fB\-\-config\fR=\fICONFIG\fR\ \fB\-\-region\fR=\fIREGION\fR) [\fB\-\-command\fR=\fICOMMAND\fR] [\fB\-\-local\-host\-port\fR=\fILOCAL_HOST_PORT\fR;\ default="localhost:0"] [\fB\-\-port\fR=\fIPORT\fR;\ default=22] [\fB\-\-ssh\-flag\fR=\fISSH_FLAG\fR] [\fB\-\-user\fR=\fIUSER\fR;\ default="user"] [\fIGCLOUD_WIDE_FLAG\ ...\fR] [\-\-\ \fISSH_ARGS\fR\ ...]
.SH "DESCRIPTION"
\fB(ALPHA)\fR SSH into a running workstation.
Note that arguments for the \f5NO_PROXY\fR environment variable must be FQDNs.
.SH "EXAMPLES"
To ssh into a running workstation, run:
.RS 2m
$ gcloud alpha workstations ssh WORKSTATION
.RE
To specify the workstation port, run:
.RS 2m
$ gcloud alpha workstations ssh WORKSTATION \-\-port=22
.RE
To ssh into a running workstation with a username, run:
.RS 2m
$ gcloud alpha workstations ssh WORKSTATION \-\-user=my\-user
.RE
To run a command on the workstation, such as getting a snapshot of the guest's
process tree, run:.RS 2m
$ gcloud alpha workstations ssh WORKSTATION \-\-command="ps \-ejH"
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
Workstation resource \- The group of arguments defining a workstation The
arguments in this group can be used to specify the attributes of this resource.
(NOTE) Some attributes are not given arguments in this group but can be set in
other ways.
To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5workstation\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp
This must be specified.
.RS 2m
.TP 2m
\fIWORKSTATION\fR
ID of the workstation or fully qualified identifier for the workstation.
To set the \f5workstation\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5workstation\fR on the command line.
.RE
.sp
This positional argument must be specified if any of the other arguments in this
group are specified.
.TP 2m
\fB\-\-cluster\fR=\fICLUSTER\fR
The cluster for the workstation.
To set the \f5cluster\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5workstation\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-cluster\fR on the command line;
.IP "\(bu" 2m
set the property \f5workstations/cluster\fR.
.RE
.sp
.TP 2m
\fB\-\-config\fR=\fICONFIG\fR
The config for the workstation.
To set the \f5config\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5workstation\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-config\fR on the command line;
.IP "\(bu" 2m
set the property \f5workstations/config\fR.
.RE
.sp
.TP 2m
\fB\-\-region\fR=\fIREGION\fR
The region for the workstation.
To set the \f5region\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5workstation\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-region\fR on the command line;
.IP "\(bu" 2m
set the property \f5workstations/region\fR.
.RE
.sp
.RE
.sp
.TP 2m
[\-\- \fISSH_ARGS\fR ...]
Flags and positionals passed to the underlying ssh implementation.
The '\-\-' argument must be specified between gcloud specific args on the left
and SSH_ARGS on the right.
.RE
.sp
.SH "FLAGS"
.RS 2m
.TP 2m
\fB\-\-command\fR=\fICOMMAND\fR
A command to run on the workstation.
Runs the command on the target workstation and then exits.
.TP 2m
\fB\-\-local\-host\-port\fR=\fILOCAL_HOST_PORT\fR; default="localhost:0"
\f5LOCAL_HOST:LOCAL_PORT\fR on which gcloud should bind and listen for
connections that should be tunneled.
\f5LOCAL_PORT\fR may be omitted, in which case it is treated as 0 and an
arbitrary unused local port is chosen. The colon also may be omitted in that
case.
If \f5LOCAL_PORT\fR is 0, an arbitrary unused local port is chosen.
.TP 2m
\fB\-\-port\fR=\fIPORT\fR; default=22
The port on the workstation to which traffic should be sent.
.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. Example:
.RS 2m
$ gcloud alpha workstations ssh \-\-ssh\-flag="\-vvv" \e
\-\-ssh\-flag="\-L 80:localhost:80"
.RE
.TP 2m
\fB\-\-user\fR=\fIUSER\fR; default="user"
The username with which to SSH.
.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 workstations ssh
.RE
.RS 2m
$ gcloud beta workstations ssh
.RE