You will need to use an ssh key to connect to VMs. This section outlines how you can create a new ssh key on the Google Cloud console and then download the private key to your local system.
Refer to the Google Cloud documentation for more information.
- Activate the Cloud Shell by clicking [>_] at the top of the console.
- Once you activate the Cloud Shell you will see the shell screen at the bottom of the browser.
- Create a new ssh key by using the ssh-keygen tool.
- Now a new key gcp-lk-quickstart is generated with a user name of gcp-user.
- In a later step you will need to register a public key gcp-lk-quickstart.pub to a new VM. Type cat gcp-lk-quickstart.pub to copy the public key.
- Download the private key with cloudshell dl gcp-lk-quickstart.
You will need this private key to connect to the VM in a later step.
Post your comment on this topic.