Connect to Google Compute Engine (GCE) Linux VM Instances Using SSH
Description
Lab Overview
Google Compute Engine (GCE) is a high-performance and scalable service that allows you to deploy virtual machines in the cloud. No matter how big your project is, Compute Engine automatically scales from one instance to thousands with the help of load-balancers. Compute Engine's VM instances boot quickly, come with persistent disk storage, and deliver consistent performance. Compute Engine also offers you discounts. The more compute resources you use, the more the discount that will be applied to your account billing.
This lab will show you two methods for connecting to Linux VM instances over SSH. The first method uses SSH keys managed by Google and is established completely within your web browser. The second method involves creating a custom SSH key pair (public and private key) and attaching the public key to the VM in the Google Cloud environment.
Learning Objectives
Upon completion of this lab you will be able to:
- Connect to Linux VM instances by using a browser-based SSH connection (SSH from the Browser)
- Generating/uploading a custom SSH key for instances
- Connect to Linux instances by using custom SSH keys
Intended Audience
This lab is intended for:
- Google Cloud Associate Cloud Engineer (ACE) certification candidates
- Individuals that are new to Google Cloud or Google Compute Engine (GCE) and want to learn more about how to interact with a Linux instance
- GCP users interested in using self-managed SSH keys
Prerequisites
This lab has no prerequisites.
Updates
July 2nd, 2024 - Updated lab to use CentOS Stream 9
January 27th, 2023 - Resolved SSH key issue
March 28th, 2022 - Updated instance image
January 27th, 2022 - Updated the instructions and screenshots to reflect the latest UI
February 14th, 2021 - Clarified instructions for generating an SSH key with no passphrase