When I try to SSH into the VM that I created on GCP's Compute Engine, this is the issue that error that is thrown:
ERROR: (gcloud.compute.ssh) User [[email protected]] does not have permission to access user [[email protected]:importSshPublicKey] (or it may not exist): Insufficient IAM permissions. The instance belongs to an external organization. You must be granted the roles/compute.osLoginExternalUser IAM role on the external organization to configure POSIX account information.
I have tried several things, including changing my roles, which you can see here: IAM Roles that I have
I have also tried to add-iam-policy-binding by running this command:
gcloud compute instances add-iam-policy-binding [email protected] --role=roles/compute.osLoginExternalUser --zone europe-west1-b. But this results in this issue:
ERROR: (gcloud.compute.instances.add-iam-policy-binding) argument --zone: INSTANCE must be specified.
Usage: gcloud compute instances add-iam-policy-binding (INSTANCE : --zone=ZONE) --member=MEMBER --role=ROLE [optional flags]
optional flags may be --help | --zone
For detailed information on this command and its flags, run:
gcloud compute instances add-iam-policy-binding --help
This has also not proved very useful and neither has this resource here.
Any help would be greatly appreciated. I can add more relevant information if need be. Thank you!