How to SSH into a Google Cloud Platform (GCP) VMs Using MobaXterm

Sanket GaikwadSanket Gaikwad
2 min read

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

  1. Go to the Google Cloud Console.

  2. Navigate to the Compute Engine section.

  3. Click Create Instance and configure your VM instance as needed.

Set Up SSH Keys in GCP

  1. In the Google Cloud Console, go to Compute Engine > VM instances.

  2. Select the VM you want to connect to.

  3. Click Edit.

  4. Scroll down to the Security SSH Keys section.

  5. 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

  1. Open MobaXterm: Launch MobaXterm.

  2. Start a New Session:

    • Click the Session icon in the top left corner.

    • Select SSH.

  3. 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).

  4. 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.

  5. 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.

0
Subscribe to my newsletter

Read articles from Sanket Gaikwad directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sanket Gaikwad
Sanket Gaikwad