如何更改默认的 Google Cloud 用户名?

pch*_*906 6 ssh ssh-keys google-compute-engine google-cloud-platform

我是 Google Cloud Platform (GCP) 的新手,我尝试创建一个新的虚拟机,但默认用户名很烦人。假设我的 gmail 是 example.email@gmail.com,用户名就是 example_email。

我怎样才能将其更改为:smith,而不是 example_email?

非常感谢!

Joh*_*ley 8

您无法更改默认用户名,因为它基于 Google 帐户身份。

您可以通过创建自己的私钥/公钥并在创建实例时指定用户名和 SSH 公钥 (ssh-rsa) 或修改现有实例上的 SSH 设置来使用不同的用户名。

添加或删除实例级公共 SSH 密钥

然后您可以使用 SSH 和您所需的用户名 (smith) 登录实例。