0

Is there a way to automatically execute the command of starting a instance and connect to it via ssh when I launch the google cloud sdk shell ? How to do ? I was thinking about a bash file which will be executed automatically and wich will also contains the 2 commands.

Cheers,

aa bb
  • 101

1 Answers1

1

I have found another question in superuser that tries to solve your problem. Specifically, from this answer we can extract that you should be able to modify your shortcut to execute a .bat file.

Therefore you should create a script, that should be something in the lines of:

@echo off
gcloud compute instances start <instance_name>
gcloud compute ssh <instance_name>

Don't forget to read the documentation of both operations and make sure they work in your scenario:

Ajordat
  • 135
  • 5