I can't access my google cloud compute engine instance using ssh through browser or gcloud. My user account has the required compute.instances.osLogin
permission (in fact it has the Owner
role) and I've set enable-oslogin
to TRUE
.
The error in browser:
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.
The error in gcloud:
ERROR: (gcloud.compute.ssh) User [my-email@gmail.com] does not have permission to access user [my-email@gmail.com:importSshPublicKey] (or it may not exist): The caller does not have permission
I even have the problem with new created instances too.