You can connect to Compute Engine instances from within the Google Cloud console by using the SSH-in-browser tool. SSH-in-browser doesn't require any additional extensions or software. SSH-in-browser supports connections to instances that store SSH keys in metadata, instances that use OS Login, and instances that use IAP for TCP forwarding.
Each time you connect to an instance by using SSH-in-browser, Compute Engine creates an ephemeral SSH key pair and sets a username for your connection. Your username and the location where Compute Engine stores your SSH keys depend on whether you use SSH keys stored in metadata, or OS Login. For more information see About SSH connections.
To use SSH-in-browser, your environment must meet the following requirements:
Your network must meet the following requirements:
google.com,
gstatic.com, or googleapis.com.0.0.0.0/0.gcloud compute scp command instead of
SSH-in-browser.The following sections describe how to use SSH-in-browser to connect to, disconnect from, and manage files on your instances.
To connect to an instance using SSH-in-browser, do the following:
In the Google Cloud console, go to the VM instances page.
In the list of instances, click the SSH button in the row of the instance that you want to connect to.
After you click SSH, SSH-in-browser opens in a new window.
If your instance has one of the following configurations, then review its section for more information about how to connect:
When you use SSH-in-browser to connect to an instance that has only an internal IP address, SSH-in-browser uses IAP TCP forwarding.
SSH-in-browser supports connections with user-uploaded ECDSA SSH keys for instances that use OS Login.
To connect to an instance with a user-uploaded SSH key, do the following:
In the Google Cloud console, go to the VM instances page.
In the list of instances, click the drop-down next to the SSH button of the instance that you want to connect to.
Click Open in browser window using provided private SSH key.
The SSH-in-browser window opens.
Click Connect with SSH key file and choose the private key that is associated associated with the public key in your OS Login profile.
To connect to a Cloud TPU, review Connect to a Cloud TPU instance.
To disconnect from an instance and terminate an SSH-in-browser session, run the exit
command.
The SSH-in-browser window also closes if you use your workstation's keyboard shortcut for closing windows:
Ctrl+W
Cmd+W
Ctrl+Shift+W
You can scroll the terminal using your mouse wheel or trackpad. Alternatively, you can use the keyboard shortcuts for your workstation's operating system.
To scroll up, use Ctrl+Shift+PageUp. To scroll down, use
Ctrl+Shift+PageDn.
To scroll up, use Fn+Shift+Up. To scroll down, use Fn+Shift+Down.
To scroll up, use Alt+Shift+Up. To scroll down, use Alt+Shift+Down.
The default copy option for SSH-in-browser is Copy on select. Any text that you highlight in SSH-in-browser is copied. You can alternatively copy and paste the text using the keyboard shortcuts for your workstation's operating system.
To copy text, use Ctrl+C. To paste text, use Ctrl+V.
To copy text, use Cmd+C. To paste text, use Cmd+V.
There is no keyboard shortcut to copy files. To paste text, use
Ctrl+Shift+V.
If you encounter problems while copying and pasting large blocks of text, then use file transfer instead.
To learn how to transfer files to and from instances using SSH-in-browser, review Transfer files using SSH-in-browser.
To debug methods and resolve common SSH errors—specifically if the SSH web console fails to connect or gets stuck on a loading screen—see the dedicated Troubleshooting SSH-in-browser guidances.
For comprehensive diagnostics, see Troubleshooting SSH.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-06-09 UTC.