Google Cloud VM guides for Mac

Reaching private Compute Engine VMs from macOS through Google's Identity-Aware Proxy: what each connection needs, the manual route, and the one-click route in Ostgate.

How these guides are made: drafted with AI assistance by the developer of Ostgate, then checked against the gcloud CLI's source, Google's and the tools' own documentation, and Ostgate's code. What a guide says about Ostgate was tried in the app on real Google Cloud projects, and every measured number says how it was measured. Each guide shows when it was last updated.

Ostgate's Connections view listing IAP tunnels to PostgreSQL on port 5432, RDP on 3389 and HTTP, each with its local 127.0.0.1 port, who may connect, and whether it is listening or in use, above two running forward profiles.
Tunnels and forwards in Ostgate

IAP Desktop for Mac

Google's IAP Desktop is Windows-only. What Mac users do instead, and how Ostgate compares feature by feature.

gcloud start-iap-tunnel vs Ostgate: IAP on a Mac

When gcloud, Terminal and Windows App are enough on a Mac, and where a native IAP client saves time, task by task.

SSH to a Compute Engine VM without a public IP from a Mac

IAP TCP forwarding for SSH: the firewall rule, IAM roles and keys, with gcloud, a bastion or Ostgate.

Azure Bastion and AWS Session Manager equivalent in GCP

IAP TCP forwarding and OS Login next to Azure Bastion and Session Manager: agent, ports, browser, audit, price.

GCP VM SSH not working: permission denied, port 22

Fix GCP VM SSH by the message you see: insufficient permissions, Permission denied (publickey), port 22, UFW lockout.

gcloud switch account: several Google accounts on a Mac

gcloud config set account, --account, named configurations, ADC that stays behind, and IAP tunnels as two accounts.

Google Cloud RDP from a Mac

Get a Windows password, open port 3389 through IAP and connect with an embedded Remote Desktop.

Port forwarding to a GCP VM over IAP from a Mac

PostgreSQL, Redis or a web UI on a VM with no external IP, on localhost: a direct IAP tunnel or an SSH local forward.

RDP errors on Compute Engine Windows VMs

Error 0x4 and 0x204, no Remote Desktop license servers, a rejected password, NLA: the cause and the fix for each.

Set or reset a GCP Windows VM password from a Mac

No default password on GCP Windows VMs: the Console and gcloud reset-windows-password, the permissions, and password timeouts.

VS Code Remote-SSH to a GCP VM through IAP on a Mac

An IAP ProxyCommand for Remote-SSH, the Dock PATH and timeout traps, and a VM that cannot download the VS Code server.

Let Claude Code or Cursor work on a private GCP VM

An AI coding agent runs ssh, scp and rsync through IAP: the setup, instructions for the agent, safe limits, and where an MCP server fits.

Termius with GCP VMs over IAP on a Mac

Termius ignores ProxyCommand: an IAP tunnel on 127.0.0.1 for SSH, SFTP and port forwarding, and host chains through a bastion.

Royal TSX with GCP VMs over IAP on a Mac

SSH through an IAP ProxyCommand, RDP and SFTP through local tunnels, and one Secure Gateway on a bastion VM.

PuTTY and WinSCP for GCP VMs on a Mac, over IAP

The Mac equivalents of PuTTY and WinSCP for a VM behind IAP: ssh, sftp, Homebrew's plink and a .ppk key conversion.

scp and rsync to a GCP VM without an external IP

gcloud compute scp, plain scp and rsync through an IAP ProxyCommand, an SFTP browser, and measured transfer times.

SFTP to a GCP VM from a Mac, no external IP

sftp or FileZilla through an IAP tunnel, SSH-in-browser upload, usernames, keys and packet errors.

Connect to Cloud SQL on a private IP from a Mac

Why a private IP is unreachable from a laptop, and how to reach it through a VM in the VPC over IAP.

DBeaver, DataGrip or TablePlus to a Cloud SQL private IP

Why the client's SSH tunnel cannot reach a private VM, the connection fields, and SSL mode through a local port.

Reach any internal load balancer from a Mac through an IAP bastion

Any internal load balancer through an IAP bastion VM: instance groups, GKE Gateway and Services, Cloud Run NEGs, host names and TLS.

gke-gcloud-auth-plugin on a Mac

Install the plugin with Homebrew or Google's archive, and fix executable gke-gcloud-auth-plugin not found in Terminal and in apps opened from the Dock.

kubectl for GKE without gcloud on a Mac

kubectl needs gke-gcloud-auth-plugin, which runs gcloud. The routes without it, what each needs, and how long each credential lasts.

kubectl to a private GKE cluster from a Mac

DNS endpoint, authorized networks, an IAP bastion with tls-server-name, SOCKS, Connect gateway or a VPN, tested on GKE 1.36.

x509: certificate signed by unknown authority on the GKE DNS endpoint

Why a pinned cluster CA fails on the gke.goog name, and the fix for kubectl, Terraform, Helm, Argo CD and Flux, tested on GKE 1.36.

Move GKE control plane access to the DNS endpoint and turn off IP access

enable-dns-access, get-credentials --dns-endpoint, then --no-enable-ip-access: what stopped answering and what happened to authorized networks on GKE 1.36.

Port-forward to a GKE Service that survives pod restarts

Why kubectl's forward ends with lost connection to pod, a restart loop, the Connect gateway's 30-minute limit, and a forward that follows ready pods.

kubectl times out on a GKE cluster

i/o timeout, EOF, TLS handshake timeout or a 403 page: the setting that blocks kubectl and the gcloud command that fixes it.

GKE Ingress shows unhealthy backends while pods are ready

UNHEALTHY backends and a 502 with every pod Ready: find the endpoint with kubectl and gcloud, then fix the targetPort, the health check path or the firewall.

OOMKilled and exit code 137 on GKE

A container over its memory limit or a node out of memory: the kernel message that tells them apart, the OOMKilling query in Cloud Logging, and why a child process restarts the whole container.

kubectl exec forbidden on GKE

cannot create resource "pods/exec": the IAM role or RBAC rule exec needs, the auth can-i check that answers the wrong question, picking a container, and kubectl debug when the image has no shell.

kubectl through the GKE Connect gateway

Fleet registration, the gateway kubeconfig and the role exec and port-forward need. Free since September 2025; the 30-minute stream limit and errors that name no permission.

Which pods use this ConfigMap or Secret?

One kubectl and jq command for every reference, which pods see a change without a restart, and rollout restart for the rest, measured on GKE 1.36.

kubectl rollout restart on a StatefulSet or DaemonSet

Why a restart replaces one StatefulSet pod or none: OnDelete, a partition, a pod that isn't Ready. DaemonSet maxUnavailable and maxSurge, tested on GKE 1.36.

kubectl logs from all pods of a Deployment at once

deployment/NAME reads one pod. --all-pods, -l and its 10-line default, and the five-stream limit on -f with the error it prints.

Connect to Memorystore Redis or Valkey from a local machine

An IAP forward through a VM with no external IP: Redis TLS on 6378 with the server CA and AUTH, and Valkey's discovery endpoint and MOVED redirects in cluster mode.

Forward ports 443 and 22 to your Mac over IAP

A service's own host name on 443 or 22 through a bastion VM: host aliases, the port helper, passwords and cleanup.

Open an internal Cloud Run service from a Mac

Why internal-ingress Cloud Run services and functions answer 404 from a laptop, and how to reach run.app through a bastion VM.

SSH into a Cloud Run container from a Mac

gcloud beta run services ssh (Preview): the --ssh flag, gen2, the roles, a shell with no ls in a minimal image, and the five-minute certificate behind ~/.ssh/config.

IAP TCP forwarding: firewall rule and IAM checklist

Everything a connection through Identity-Aware Proxy needs: 35.235.240.0/20, roles and ports.

IAP tunnel slow or disconnecting on a Mac

Idle timeouts, sleep and network changes, reauthentication and slow gcloud tunnels: the cause and the fix for each.

IAP tunnel error codes explained

What 4003, 4033 and the other IAP relay close codes mean, and how to fix each one.

gcloud crashed (DatabaseError): file is not a database

Which of gcloud's .db files broke, what deleting each one costs, and the IAP tunnel race that damages the configs DB.