Connect to VM Instance using SSH

There are different ways to connect to the VM instance using SSH.

  1. Method 1: SSH - Open in Browser Window

  2. Method 2: SSH - Cloud Shell

Method 1: SSH - Open in Browser Window

Perform the following steps to access SSH - Open in Browser Window.

  1. Log in to the Google Cloud Console.

  2. Search Identity-Aware Proxy in the console.

    Note: To enable the Cloud Identity-Aware Proxy API, you must have IAP-secured Tunnel User and Service Usage Admin permissions.

  3. Enable Cloud Identity-Aware Proxy API.

    netwitness_api_enable.png

    This will enable the SSH button in the row of newly created VM instance.

  4. Go to the VM instances page.

  5. In the row of an instance, select Open in browser window from the SSH drop-down menu.

netwitness_connect_instance_1879x178.png

A new window opens and connects to the VM instance.

Method 2: SSH - Cloud Shell

Perform the following steps to access SSH - Cloud Shell.

  1. Log in to the Google Cloud console page.

  2. On the top right corner of the console, click Activate Cloud Shell.

    netwitness_activate_cloud_shell_1293x78.png

    The cloud shell page is displayed.

  3. Run the following command:

    - gcloud compute ssh <instance-name> --zone=<zone-name> --project=<project-name>

    A confirmation pop-up is displayed to Authorize Cloud Shell.

  4. Click Authorize.

    This will connect to the VM instance through SSH.

    netwitness_cloud_shell_1455x452.png