- NAME
-
- gcloud alpha cloud-shell ssh - allows you to establish an interactive SSH session with Cloud Shell
- SYNOPSIS
-
-
gcloud alpha cloud-shell ssh
[ --command
=COMMAND
][ --dry-run
][ --force-key-file-overwrite
][ --ssh-flag
=SSH_FLAG
][ --ssh-key-file
][ GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
(ALPHA)
gcloud alpha cloud-shell ssh
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. - FLAGS
-
--command
=COMMAND
-
A command to run in Cloud Shell.
Runs the command in Cloud Shell and then exits.
--dry-run
- If provided, prints the command that would be run to standard out instead of executing it.
--force-key-file-overwrite
-
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.
--ssh-flag
=SSH_FLAG
-
Additional flags to be passed to
ssh(1)
. --ssh-key-file
-
The path to the SSH key file. By default, this is
~/.ssh/google_compute_engine
.
- GCLOUD WIDE FLAGS
-
These flags are available to all commands: --account, --configuration,
--flatten, --format, --help, --log-http, --project, --quiet, --trace-token,
--user-output-enabled, --verbosity. Run
$ gcloud help
for details. - EXAMPLES
-
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
- NOTES
- This command is currently in ALPHA and may change without notice. Usually, users of ALPHA commands and flags need to apply for access, agree to applicable terms, and have their projects whitelisted. Contact Google or sign up on a product's page for ALPHA access. Product pages can be found at https://cloud.google.com/products/.
- Cloud SDK
- Product Overview
- Documentation
- gcloud Overview
- Quickstarts
- All Quickstarts
- For Linux
- For Debian and Ubuntu
- For Red Hat and CentOS
- For macOS
- For Windows
- How-to Guides
- All How-to Guides
- Installing the SDK
- Setting up the SDK
- Managing SDK Components
- Scripting gcloud Commands
- Using gcloud Interactive Shell
- APIs & Reference
- gcloud Reference
- Overview
- gcloud alpha
- Overview
- app
- auth
- billing
- cloud-shell
- compute
- Overview
- accelerator-types
- addresses
- backend-buckets
- backend-services
- commitments
- config-ssh
- connect-to-serial-port
- copy-files
- disk-types
- disks
- firewall-rules
- forwarding-rules
- health-checks
- http-health-checks
- https-health-checks
- images
- instance-groups
- Overview
- describe
- get-named-ports
- list
- list-instances
- managed
- set-named-ports
- unmanaged
- instance-templates
- instances
- Overview
- add-access-config
- add-labels
- add-maintenance-policies
- add-metadata
- add-tags
- attach-disk
- create
- create-with-container
- delete
- delete-access-config
- describe
- detach-disk
- get-serial-port-output
- list
- move
- network-interfaces
- remove-labels
- remove-maintenance-policies
- remove-metadata
- remove-tags
- reset
- resume
- set-disk-auto-delete
- set-machine-type
- set-min-cpu-platform
- set-scheduling
- set-scopes
- simulate-maintenance-event
- start
- stop
- suspend
- tail-serial-port-output
- update
- update-access-config
- update-container
- interconnects
- machine-types
- maintenance-policies
- networks
- operations
- os-login
- project-info
- regions
- reset-windows-password
- rolling-updates
- routers
- routes
- scp
- security-policies
- shared-vpc
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- sign-url
- snapshots
- ssh
- ssl-certificates
- ssl-policies
- target-http-proxies
- target-https-proxies
- target-instances
- target-pools
- target-ssl-proxies
- target-tcp-proxies
- target-vpn-gateways
- tpus
- url-maps
- vpn-tunnels
- xpn
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- zones
- config
- container
- dataflow
- deployment-manager
- emulators
- endpoints
- firebase
- functions
- genomics
- Overview
- callsets
- datasets
- operations
- pipelines
- readgroupsets
- reads
- references
- referencesets
- variants
- variantsets
- init
- interactive
- iot
- kms
- ml
- Overview
- language
- products
- speech
- video
- vision
- ml-engine
- monitoring
- organizations
- projects
- pubsub
- Overview
- snapshots
- subscriptions
- topics
- resource-manager
- resources
- scheduler
- search-help
- services
- source
- spanner
- Overview
- databases
- instance-configs
- instances
- operations
- tasks
- gcloud app
- gcloud auth
- gcloud beta
- Overview
- app
- Overview
- browse
- create
- deploy
- describe
- domain-mappings
- firewall-rules
- gen-config
- instances
- logs
- open-console
- operations
- regions
- repair
- services
- ssl-certificates
- update
- versions
- auth
- bigtable
- billing
- compute
- Overview
- accelerator-types
- addresses
- backend-buckets
- backend-services
- commitments
- config-ssh
- connect-to-serial-port
- copy-files
- disk-types
- disks
- firewall-rules
- forwarding-rules
- health-checks
- http-health-checks
- https-health-checks
- images
- instance-groups
- Overview
- describe
- get-named-ports
- list
- list-instances
- managed
- set-named-ports
- unmanaged
- instance-templates
- instances
- Overview
- add-access-config
- add-labels
- add-metadata
- add-tags
- attach-disk
- create
- create-with-container
- delete
- delete-access-config
- describe
- detach-disk
- get-serial-port-output
- list
- move
- network-interfaces
- remove-labels
- remove-metadata
- remove-tags
- reset
- set-disk-auto-delete
- set-machine-type
- set-scheduling
- set-scopes
- start
- stop
- tail-serial-port-output
- update
- update-access-config
- update-container
- interconnects
- machine-types
- networks
- operations
- os-login
- project-info
- regions
- reset-windows-password
- routers
- routes
- scp
- security-policies
- shared-vpc
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- snapshots
- ssh
- ssl-certificates
- ssl-policies
- target-http-proxies
- target-https-proxies
- target-instances
- target-pools
- target-ssl-proxies
- target-tcp-proxies
- target-vpn-gateways
- tpus
- url-maps
- vpn-tunnels
- xpn
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- zones
- config
- container
- dataflow
- dataproc
- Overview
- clusters
- jobs
- operations
- workflow-templates
- datastore
- debug
- deployment-manager
- dns
- domains
- emulators
- endpoints
- error-reporting
- firebase
- functions
- iam
- init
- iot
- kms
- logging
- ml
- Overview
- language
- speech
- video
- vision
- ml-engine
- organizations
- projects
- pubsub
- Overview
- subscriptions
- topics
- resource-manager
- runtime-config
- services
- source
- spanner
- Overview
- databases
- instance-configs
- instances
- operations
- sql
- tasks
- gcloud components
- gcloud compute
- Overview
- accelerator-types
- addresses
- backend-buckets
- backend-services
- commitments
- config-ssh
- connect-to-serial-port
- copy-files
- disk-types
- disks
- firewall-rules
- forwarding-rules
- health-checks
- http-health-checks
- https-health-checks
- images
- instance-groups
- Overview
- describe
- get-named-ports
- list
- list-instances
- managed
- set-named-ports
- unmanaged
- instance-templates
- instances
- Overview
- add-access-config
- add-labels
- add-metadata
- add-tags
- attach-disk
- create
- delete
- delete-access-config
- describe
- detach-disk
- get-serial-port-output
- list
- move
- remove-labels
- remove-metadata
- remove-tags
- reset
- set-disk-auto-delete
- set-machine-type
- set-scheduling
- set-service-account
- start
- stop
- tail-serial-port-output
- update
- update-access-config
- interconnects
- machine-types
- networks
- operations
- os-login
- project-info
- regions
- reset-windows-password
- routers
- routes
- scp
- shared-vpc
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- snapshots
- ssh
- ssl-certificates
- target-http-proxies
- target-https-proxies
- target-instances
- target-pools
- target-ssl-proxies
- target-tcp-proxies
- target-vpn-gateways
- url-maps
- vpn-tunnels
- xpn
- Overview
- associated-projects
- disable
- enable
- get-host-project
- list-associated-resources
- organizations
- zones
- gcloud config
- gcloud container
- gcloud dataflow
- gcloud dataproc
- gcloud datastore
- gcloud debug
- gcloud deployment-manager
- gcloud dns
- gcloud docker
- gcloud domains
- gcloud endpoints
- gcloud feedback
- gcloud firebase
- gcloud help
- gcloud iam
- gcloud info
- gcloud init
- gcloud iot
- gcloud kms
- gcloud logging
- gcloud ml
- Overview
- language
- speech
- video
- vision
- gcloud ml-engine
- gcloud organizations
- gcloud projects
- gcloud pubsub
- gcloud services
- gcloud source
- gcloud spanner
- Overview
- databases
- instance-configs
- instances
- operations
- gcloud sql
- gcloud topic
- gcloud version
- Google Cloud Client Libraries
- Resources
- All Resources
- Release Notes
- Usage Statistics
- Support
- Community Support
- File Product Issues
- Google Cloud Platform Support