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

标签 linux ssh google-cloud-platform debian

我在 Google Cloud 中创建了一个 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)

请注意,该密码还将用于屏幕锁定。

关于linux - 通过 SSH 连接时我的密码是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57879605/

相关文章:

Git fetch/pull/clone 卡在接收对象上

bash - SSH Heredoc在另一台服务器上运行Perl脚本找不到正确的路径

git - 如何从远程 ssh 传入 git rsa 密码?

python - 在 GCP 上使用 python numpy 和 pandas 部署小批量作业

c - 尽管出现警告消息 'not found",但已成功删除内核模块

c++ - 如何在 Linux 中获取 C/C++ 中的用户名?

linux - Yocto 构建在 gcc 和硬 fpu 问题上崩溃

c - Valgrind:是否有内存泄漏?

google-app-engine - 如何在不使用环境变量的情况下使用凭据访问 Google Datastore API?

kubernetes - 如何在GCP中快速备份和还原kubernetes集群