How to paste ssh key in GCP, generated by puttygen?

To paste an SSH key generated by PuTTYgen into Google Cloud Platform (GCP), follow these steps:

  1. Generate the SSH key using PuTTYgen:
  • Open PuTTYgen.
  • Click on the “Generate” button.
  • Move the mouse around to generate randomness.
  • Once the key is generated, you will see the public key in the top box.
  1. Convert the PuTTYgen key to the required format:
  • In PuTTYgen, click on “Conversions” in the menu.
  • Select “Export OpenSSH key” and save the private key file. This file will be in the format GCP requires.
  1. Copy the public key:
  • In the PuTTYgen window, select the entire text in the “Public key for pasting into OpenSSH authorized_keys file” box.
  • Copy this text to your clipboard.
  1. Add the SSH key to your GCP project:
  • Open the Google Cloud Console.
  • Go to the “Compute Engine” section.
  • Select “Metadata” from the left sidebar.
  • Click on the “SSH Keys” tab.
  • Click on the “Edit” button.
  • Paste your public key into the “Add SSH Key” box.
  • Save the changes.
  1. Access your GCP VM instance using the SSH key:
  • Open PuTTY.
  • In the “Host Name (or IP address)” box, enter the external IP of your VM instance.
  • In the “Connection” category on the left, expand “SSH” and select “Auth”.
  • In the “Private key file for authentication” box, browse and select the private key file you saved earlier.
  • Click “Open” to connect to your VM instance.

You should now be able to access your GCP VM instance using the SSH key generated by PuTTYgen.

Leave a comment

Your email address will not be published. Required fields are marked *