ever since creating a VM used for Google Cloud Translation API, I can no longer SSH to my VM instance. Initially, before setting permissions for the service accounts used with this VM i could SSH to my instance. But as soon as i made these changes to permissions SSH stopped working. I have tried to do everything to fix this: regenerate key pair, check permissions, check firewall settings in VPS Network, etc. But no joy. Any pointers would be most appreciated. Regards.
reating my VM instance used for Google Cloud Translation
Solved! Go to Solution.
Sorry, @legrandtimonier I don't see any attachments.
Please paste your SSH command that you are using to SSH into the machine and the output/error that you see.
Hello legrandtimonier,
Welcome to GCC!
If TCP:22 is already allowed in your firewall with type Ingress, then there is no issue with GCP Firewall but your next step is also to configure your firewall to allow access through Identity-Aware Proxy (IAP).
If you need to set up your instance with Identity-Aware Proxy (IAP), you may refer to this document Setting up IAP for Compute Engine. But if you already set up your instance, you just need to enable IAP Enabling IAP for Compute Engine.
Hi again Willbin,
I am in the process of adding IAP to my project, but I see certain discrepancies between what it says in the documentation and what I see on my interface, assuming I am in the right place. It says clearly in the documentation:
Next to my-backend-service, toggle the on/off switch in the IAP column.
Well, I see no such message. I do see my VM instance listed, but nothing to toggle. I hope I am not doing something wrong here. I have set up the consent screen, put in a user (me, the principal, at my Gmail address), but that's all. I saw at one point in the documentation that I should be able to send a URL to a person (myself in this case), but I see nowhere to copy it from. Or perhaps when adding IAP one sees different things on the screen? Any tips would be appreciated in what I sense is the last phase before things should work and I can start translating my docs.
@legrandtimonier I think you are getting confused with IAP for SSH forwarding and IAP for web traffic. In this specific case, we are referring to IAP for SSH/TCP forwarding. Please allow traffic from 35.235.240.0/20 on port 22 into your VPC. Also please post the SSH command you are using. Is the VM using an internal IP or external IP or both?
Please post the ssh command and the error message here
Sorry, @legrandtimonier I don't see any attachments.
Please paste your SSH command that you are using to SSH into the machine and the output/error that you see.
Hi again,
Just after writing you my last message I decided to stop fiddling around with the SSH button in the console and go to my SDK and run the "gcloud compute ssh ...". command from the command line. Now, why I didn't try this earlier is a mystery to me, preferring to knock my head against the wall trying to figure out why Troubleshooting said all was OK, though I was not let in to SSH via the console (the way I had been just after setting up my VM but before creating service accounts and giving the necessary permissions). In any case, thanks for getting back to me initially on this. You helped guide me in the right direction. By the way, I have now removed the OAuth entry, sensing it might not at all be necessary in my scenario, at least as long as there are no other users who need to run my translation program. Regards, Gary