小编Pat*_*atS的帖子

GCP - sudo 在 GoogleCloudShell 中有效,但在我 ssh 进入 vm 时无效

我创建了一个全新的 Google Compute Engine VM (Debian 9) 并使用 GoogleCloud shell 打开了一个 shell。我可以sudo从那个浏览器外壳窗口。

然后我将我的 ssh 密钥和 ssh 设置到虚拟机中。为了便于讨论,我的用户名是“user123”。我使用以下 SSH 连接到我的 GCP 虚拟机:

ssh user123@1.2.3.4

其中 1.2.3.4 是我的 GCP 外部 IP 地址。然后我登录了。

所以当用户user123GoogleCloudShell sudo工作,但通过登录时的sshuser123,我提示输入密码。

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great …
Run Code Online (Sandbox Code Playgroud)

ssh google-cloud-platform

4
推荐指数
1
解决办法
8090
查看次数

标签 统计

google-cloud-platform ×1

ssh ×1