Stay organized with collections Save and categorize content based on your preferences.
gcloud alpha compute connect-to-serial-port
[USER
@]INSTANCE
[--dry-run
] [--extra-args
=KEY
=VALUE
,[KEY
=VALUE
,…]] [--force-key-file-overwrite
] [--location
=LOCATION
] [--port
=PORT
; default=1] [--ssh-key-file
=SSH_KEY_FILE
] [--zone
=ZONE
] [--ssh-key-expiration
=SSH_KEY_EXPIRATION
| --ssh-key-expire-after
=SSH_KEY_EXPIRE_AFTER
] [GCLOUD_WIDE_FLAG …
]
(ALPHA)
gcloud alpha compute connect-to-serial-port
allows users to connect to, and interact with, a VM's virtual serial port using ssh as the secure, authenticated transport protocol.
The user must first enable serial port access to a given VM by setting the 'serial-port-enable=true' metadata key-value pair. Setting 'serial-port-enable' on the project-level metadata enables serial port access to all VMs in the project.
This command uses the same SSH key pair as the gcloud compute ssh
command and also ensures that the user's public SSH key is present in the project's metadata. If the user does not have a public SSH key, one is generated using ssh-keygen.
gcloud alpha compute connect-to-serial-port my-instance --zone=us-central1-f
USER
@]INSTANCE
specifies the username to authenticate as. If omitted, the current OS user is selected.USER
--dry-run
--force-key-file-overwrite
If disabled, the files associated with a broken SSH key will not be regenerated and will fail in both interactive and non-interactive environments.
--location
=LOCATION
--port
=PORT
; default=1
Instances can support up to four serial ports. By default, this command will connect to the first serial port. Setting this flag will connect to the requested serial port.
--ssh-key-file
=SSH_KEY_FILE
~/.ssh/google_compute_engine
.
--zone
=ZONE
compute/zone
property isn't set, you might be prompted to select a zone (interactive mode only).
To avoid prompting when this flag is omitted, you can set the
property:compute/zone
gcloud config set compute/zone ZONE
A list of zones can be fetched by running:
gcloud compute zones list
To unset the property, run:
gcloud config unset compute/zone
Alternatively, the zone can be stored in the environment variable
.CLOUDSDK_COMPUTE_ZONE
--ssh-key-expiration
=SSH_KEY_EXPIRATION
--ssh-key-expire-after
=SSH_KEY_EXPIRE_AFTER
--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 $ gcloud help
for details.
gcloud compute connect-to-serial-port
gcloud beta compute connect-to-serial-port
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-07 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4