My scrapbook about almost anything I stumble upon in my tech world. If you find anything useful don't forget to give thumbs-up :)

Breaking

Tuesday, March 30, 2021

How to SSH to Google Cloud Virtual Machine from Local Machine - I


1. Create SSH Key





















2. Add your SSH keys to your VM 
    - Select Your VM
    - Edit your VM machine by clicking on EDIT
    - Add SSH Public Key to your VM 
    



















3. Now, you can run gcloud ssh command to your GCP VM.  You can get this command by clicking on SSH dropdown as below - 


 

4. Once, you execute the gcloud ssh command in your machine, it will use the ssh keypair which we have generated in step #1 to connect to GCP VM, considering you already logged in your GCP account.
























5. If you want to configure plain SSH connection with GCP VM, you can do it by following below steps - 
a. Get the External IP for your GCP VM
    - gcloud compute instances list
    














b. Now, configure Putty to connect to GCP VM as below screenshots

























Like the below page to get the update -
Facebook Page      Facebook Group      Twitter Feed      Telegram Group

No comments:

Post a Comment

Disclaimer

The postings on this site are my own and don't necessarily represent IBM's or other companies positions, strategies or opinions. All content provided on this blog is for informational purposes and knowledge sharing only.
The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of his information.