SSH With Google Cloud

Blog Summary: (AI Summaries by Summarizes)
  • To SSH into your Google Cloud instance, you need to create a new SSH key using the `ssh-keygen` program.
  • The program will create a public and private key pair for you to use with Google Cloud.
  • To get the public key for your Google Cloud Console, run `cat ~/.ssh/google_compute_engine.pub` and copy the output.
  • Go to the Metadata Page in the Google Cloud Console, click on Edit, then Add new item, and paste the contents of your clipboard to the new key text box.
  • Finally, go back to the terminal and type in `gcloud compute --project "your-project-name" ssh --zone "the-instances-zone" "instance-name"` to SSH into your instance.

Let’s just say that Google Cloud’s SSH instructions aren’t the greatest. Here are the steps to SSH into your instance. It also assumes that you’ve installed the gcloud program. These instructions are for MacOSX and Linux.

We start off by creating a new SSH key. $ ssh-keygen -t rsa -f ~/.ssh/google_compute_engine -C yourgooglecloudemailaddress@example.com

The ssh-keygen program will create a public and private key pair for you to use with Google Cloud.

Next, you’ll need the public key for your Google Cloud Console. Run: $ cat ~/.ssh/google_compute_engine.pub

That will be output something like: ssh-rsa AAAALOTSOFLETTERSAAAA yourgooglecloudemailaddress@example.com

Copy all of the output of the cat command to your clipboard.

Go to the Metadata Page. Click on Edit. Click on Add new item. Paste the contents of your clipboard to the new key text box.

Go back to the terminal. Type in: $ gcloud compute --project "your-project-name" ssh --zone "the-instances-zone" "instance-name"

And you’re SSH’d in to your instance.

Related Posts

The Difference Between Learning and Doing

Blog Summary: (AI Summaries by Summarizes)Learning options trading involves data and programming but is not as technical as data engineering or software engineering.Different types of

The Data Discovery Team

Blog Summary: (AI Summaries by Summarizes)Data discovery team plays a crucial role in searching for data in the IT landscape.Data discovery team must make data