gcloud compute ssh
only targets nic0
, therefore it is not possible to use it. The same applies to the SSH button in the VM instances list within the GCP Cloud Console.
Here is how I do it using gcloud
and openssh
from my Mac.
Make sure you have setup the Google Cloud SDK which provides you with the gcloud
cli.
> gcloud config get-value project
black-transport-233607