How to SSH into a Google Cloud Platform (GCP) VMs Using MobaXterm
Establishing a secure SSH connection to your Google Cloud Platform (GCP) Virtual Machine (VM) using MobaXterm can streamline your workflow and provide a safe way to manage your instances. This guide will walk you through the process step by step.
Step 1: Set Up Your GCP VM for SSH
Create a VM Instance
Go to the Google Cloud Console.
Navigate to the Compute Engine section.
Click Create Instance and configure your VM instance as needed.
Set Up SSH Keys in GCP
In the Google Cloud Console, go to Compute Engine > VM instances.
Select the VM you want to connect to.
Click Edit.
Scroll down to the Security SSH Keys section.
Add your public SSH key. If you don't have one, you can generate it using MobaXterm (steps provided in LINK), and save the changes.
Step 2: Configure MobaXterm for SSH Connection
Open MobaXterm: Launch MobaXterm.
Start a New Session:
Click the Session icon in the top left corner.
Select SSH.
Configure the SSH Session:
Remote Host: Enter the external IP address of your GCP VM.
Specify Username: Enter the username for your GCP VM. This is typically your Google Cloud username or the username you set up in the VM e.g. s123456789 ( s123456789@gmail.com).
Advanced SSH Settings:
Click on the Advanced SSH settings tab.
Use private key: Browse to and select the private key file that you saved earlier.
Ensure the private key is in the correct format. If it’s a
.ppk
file, MobaXterm should recognize it.
Start the Session:
Click OK to start the session.
MobaXterm will use your private key to authenticate and establish an SSH connection to your GCP VM.
Subscribe to my newsletter
Read articles from Sanket Gaikwad directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by