Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Google Cloud Platform SSHNew to Visual Studio Code? Get it now.
Google Cloud Platform SSH

Google Cloud Platform SSH

Andrew Dircks

|
34,875 installs
| (1) | Free
Connect to Google Cloud VM instances automatically with Remote SSH
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Google Cloud Platform - SSH

Visual Studio Code extension for connecting to GCP virtual machine instances via Remote SSH.

Features

  • Lightweight, automated connection to GCP instances with Connect action
  • Directly compatible with the Remote SSH extension

Requirements

  • Linux/macOS system with ssh-keygen configured
  • Git
  • Python
  • Google Cloud Platform SDK with gcloud command
  • Remote SSH extension

Use

  1. Ensure your current GCP project is set with gcloud config set project [PROJECTNAME]
  2. Open the command pallete (Cmd+Shift+P) and select Google Cloud Platform - Connect via Remote SSH
  3. Select Connect to create an SSH connection with a GCP instance, enter
    • the GCP project name configured in 1.
    • a SSH key username
    • the IP address of the VM instance you are connecting to (Console->Resources->VM instances on GCP)
    • the name of your SSH keyfile (project name by default)
  4. Enter a password for the SSH key-pair as prompted in the VS Code integrated terminal
  5. Connect to the newly added host via Remote SSH extension (name is IP address)

Change the location of your SSH directory with ChangeSSHDirectory action.

How it works

The extension launches script.sh from this repo in the integrated terminal. This creates a SSH key-pair via ssh-keygen, adds it to your GCP project globally with gcloud compute project-info add-metadata, and configures with Remote SSH manually by editing to the ~/.ssh/config file used by the extension.

Known Issues

  • Won't work with Windows
  • Make sure the location of your SSH keys is set before connecting (most commonly ~/.ssh)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft