You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GCP虚拟机基于IAM的OS Login登录失败问题求助

问题概述

基于IAM的虚拟机OS Login登录功能出现故障。

错误详情

使用gcloud cli执行gcloud compute ssh时,出现以下错误:

ERROR: (gcloud.compute.ssh) User [abc@gmail.com] does not have permission to access users instance [abc@gmail.com] (or it may not exist): End user credentials must match the user specified in the request. Request for user [ abc@gmail.com] does not match the credential for [ABc@gmail.com].

通过浏览器点击VM实例页面的SSH按钮登录时,错误信息如下:

End user credentials must match the user specified in the request. Request for user [ abc@gmail.com] does not match the credential for [ABc@gmail.com].

已测试操作

执行以下操作后,错误仍持续存在:

  • 在现有项目中创建新虚拟机
  • 在新项目中创建新虚拟机
  • 添加小写邮箱的主体,触发了加入自身项目的邮件,但点击后仅进入GC控制台欢迎页面,小写主体未被添加至访问列表
  • 失效并重新认证gcloud cli
背景信息

该项目中的虚拟机已使用OS Login超过一年,此前浏览器SSH及gcloud cli均可正常登录。项目仅有一位用户,基本无人维护,未执行过任何可能修改虚拟机或用户权限的操作,测试用户拥有项目及虚拟机的所有者权限。

临时解决方案

移除元数据标签以禁用OS Login并重启虚拟机后,旧SSH方式可正常工作。

推测原因

上述错误存在两处异常:一是邮箱大小写不一致,二是“Request for user”中的邮箱前存在多余空格,推测问题源于Google端。

寻求解决方案

现需解决该OS Login登录失败的问题。

内容的提问来源于stack exchange,提问作者stern_terabyte

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.25 21:34:58