Quick Links:
❤️ Learn Google Console APIs via Oauth2: Click here
Connecting via gcloud:
Source: Click here @ youtube
In gcloud you can add the private key like:
# The pair of keys generated from the ssh-keygen windows's gui app generates private keys in standard format and the cli binary always expect you provide private key in openssh version format.
# Although if you generate private keys using command below you'll always get key in opennssh format by default, so alwasy use ssh cli to connect and ssh-keygen to generate keys.(*Never use ssh-keygen or putty directly anywhere).
# check ssh version
ssh -v
# Create ssh key pair
ssh-keygen
## Or you can create sshkyes using key file name
ssh-keygen -t rsa -b 4096 -f myLocaltWideUser
# In google cloud console, you can go to "Compute Engine" > "VM Instances" then select your instance, and click "EDIT" and in the "SSH Keys" section you can add below entry (and don't forget to to add your instance's user name there which you want to connect to):
ssh-rsa PUBLIC_KEY_FROM_YOUR_KEY_.PUB_FILE_HERE sahil
# We can ssh using:
ssh -i myPrivateKey.ppk sahil@123.123.123.123
# `glcloud` manages creation of ssh keys under the hood though ~ IMO, Sahil
gcloud beta compute ssh --zone "us-central1-a" "instance-1" --project "myProject"
gcloud beta compute ssh --zone "us-central1-a" "instance-2" --project "myProject" --ssh-key-file myPublic.pub
Cloud Functions:
Viewing logs in cloud functions:
Cloud Build History:
Others: