Accessing your instance with gcloud

There are two important things you want to do from the start:

  • Accessing the instance
  • Moving files between your instance and another machine. To do ssh into your instance, run:
$ gcloud compute ssh <instance_name>

In our case:

$ gcloud compute ssh sparrow

The first time you access your instance from your local system, the platform will propagate your keys to the instance, which may take a few minutes. Once connected, you can verify that your local public key (cat ~/.ssh/google_compute_engine.pub) is included in the list of authorized_keys on your instance (cat ~/.ssh/authorized_keys).

Get Hands-On Machine Learning on Google Cloud Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.