Compute Engine SSH: You do not have sufficient permissions to SSH into this instance

3,835 views
Skip to first unread message

USPL

unread,
Mar 25, 2019, 10:23:20 AM3/25/19
to gce-discussion
Hello,

I want to give another user access to my VM with full permissions. But when that user tries to connect to my machine using SSH, it is giving the following error: 

You do not have sufficient permissions to SSH into this instance. You need one of compute.instances.setMetadata, compute.projects.setCommonInstanceMetadata or compute.instances.osLogin (with OsLogin enabled) and iam.serviceAccounts.actAs.


OS Login is enabled.
OS: CentOS 7

The user is given the following permissions: 

Untitled.png

Still, the user cannot ssh into my instance.


Can anyone please assist?


Thanks

Justin Reiners

unread,
Mar 25, 2019, 3:18:13 PM3/25/19
to USPL, gce-discussion
I think you actually need to disable OS login? I do not use it on any of my 100 Centos instances, so I don't think you need it enabled, and as such it might be the cause of your issue.

--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/10731097-9e7f-46ec-8186-75375fab547f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Justin Reiners

Kamelia Y

unread,
Apr 5, 2019, 2:32:49 PM4/5/19
to gce-discussion

Hi,


If the user you are giving permission is not under the same organization,  you need to grant the role : roles/compute.osLoginExternalUser to the user to connect to VM via ssh.


Reply all
Reply to author
Forward
0 new messages