powershellgoogle-cloud-platformgoogle-compute-enginewindows-terminal

How to use Google Cloud Shell with the new Windows Terminal


I just want to SSH into my compute instances using a profile in the new Windows Terminal app.


Solution

  • Nvm, I found out you can add a commandline argument to the profiles section. For anybody else trying to figure this out:

    {
           "guid": "{*add_a_guid*}",
           "name": "Google Cloud Shell",
           "commandline": "ssh -i *path_to_ssh_key* *username*@*ip_address*",
           "icon": "C:\\Program Files (x86)\\Google\\Cloud SDK\\cloud_platform_logo.ico",
           "hidden": false
    }
    

    You can generate a guid in PowerShell using this command:

    [guid]::NewGuid()