通过 SSH 连接时我的密码是什么?

What is my password when I connect via SSH?

我在 Google 云中创建了一个 Debian VM,从 GCP 界面单击 SSH。打开了一个控制台 shell,没问题,我已经登录了。现在我想使用 sudo:它会询问我当前的密码。我的密码是什么?另外,root密码是多少?

Google Compute Engine 创建的用户帐户未设置密码。这意味着不可能使用 sudo 并且大多数屏幕锁定应用程序无法解锁。 设置密码 follow steps from the documentation:

  1. 使用 SSH 连接到实例,就像您第一次设置实例时所做的那样。 Here is the documentation how to connect using SSH.
  2. 为用户创建密码: sudo passwd $(whoami)

请注意,此密码也将用于屏幕锁定。