1

I am wondering if there is a way to hook up my Google Compute Engine VM to Cloud Shell. The purpose is so that I can edit files in my VM using Cloud Shell editor. Thanks.

Pelangi
  • 13
  • 2

1 Answers1

0

Cloud Shell environment is a Docker container that is using g1-small machine type.

You can use gcloud command from Cloud Shell to SSH to your VM. From there you can add and edit files by using classic linux terminal commands.

gcloud compute ssh --project [PROJECT_ID] --zone [ZONE] [INSTANCE_NAME]

With the Cloud Shell editor you can only move files of the Cloud Shell VM, but you can not use this editor for VMs created in Google Cloud Platform.

Also you can change your Cloud Shell environment image, but it cant be any of your GCP VMs. Here is the direct link.

Ivan
  • 76
  • 3
  • Thanks @Ivan. I know we can SSH in to the VM but I wanted to make sure that I didn't miss anything on using Cloud Shell editor to edit files in my VM. Your answer clarifies it. Thanks. – Pelangi Aug 27 '19 at 21:54