0

I'm new to Google Cloud Platform and want to build a deployment pipeline via Jenkins. I have a virtual machine up and running that I connect via SSH button given on the dashboard and do deployments.

Unlike AWS where I get pem file to connect... I don't have a file to connect here. Now, in Jenkins when I want to connect via shell script and deploy latest code on VM - I don't know how to do it.

something like

ssh -i @some-file name:ip

Kindly help as to how can I connect/ssh gcp vm via shell in Jenkins and make deployments. Step by step answer needed. Thanks!

Maxim
  • 4,075
  • 1
  • 14
  • 23
Vaibhav Magon
  • 1,453
  • 1
  • 13
  • 29

1 Answers1

0

There are still PEM files stored in the VM instance, you can locate them in $HOME/.ssh. See this stack post about how to retrieve SSH keys on GCE

Patrick W
  • 4,603
  • 1
  • 12
  • 26
  • yes, Google offers fully managed SSH keys if you want, otherwise, the SSH protocol is pretty standard for Linux regardless of the Cloud provider – Patrick W Oct 19 '18 at 13:05