At the bottom of the Trusted Cloud console, a
Cloud Shell
session starts and displays a command-line prompt. Cloud Shell is a shell environment
with the Google Cloud CLI
already installed and with values already set for
your current project. It can take a few seconds for the session to initialize.
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-08 (世界標準時間)。"],[[["This document details how to enable and use root login for Linux virtual machines (VMs) on Compute Engine, although using `sudo` is recommended as a more secure alternative."],["By default, Compute Engine VMs prevent root login via password over SSH, requiring modifications to the `/etc/ssh/sshd_config` file, setting `PermitRootLogin` to `prohibit-password`, and creating and adding keys to the `authorized_keys` file for root."],["The process for enabling root login differs slightly between OS Login and Non-OS Login VMs, with OS Login VMs requiring the creation of an SSH key, while Non-OS Login VMs need to change SSH configuration settings."],["Connecting as the root user can be done via the `gcloud compute ssh` command for VMs that do not have OS Login enabled, or through third-party tools for both OS Login and Non-OS Login VMs by using the root user key."],["Troubleshooting SSH connections and managing access and file transfers to VMs are also linked, and are relevant to the overall context of connecting to Linux VMs."]]],[]]