SSH-in-browser Stay organized with collections Save and categorize content based on your preferences.
You can connect to Compute Engine virtual machine (VM) instances from withinthe Google Cloud console by using the SSH-in-browser tool. SSH-in-browser doesn'trequire any additional extensions or software. SSH-in-browser supportsconnections to VMs that storeSSH keys in metadata,VMs that useOS Login, andVMs that useIAP for TCP forwarding.
Each time you connect to a VM by using SSH-in-browser, Compute Enginecreates an ephemeral key pair and sets a username for your connection.Yourusername and the location where Compute Engine stores your SSH keysdepend on whether you use SSH keys stored in metadata, or OS Login.For more information seeAbout SSH connections.
Requirements
To use SSH-in-browser, your environment must meet the following requirements:
- Google Cloud console must be running in asupported web browser.
- The VM you're connecting to must have theguest environmentinstalled and running. Theguest environment is pre-installed on VMs that you create fromGoogle-provided public images.
Your network must meet the following requirements:
- HTTPS proxies and security devices must not decrypt and re-encrypt trafficusing their own TLS certificate, for example, to perform TLS inspection.
- The network must allow traffic to and from hostnames ending in
google.com,gstatic.com, orgoogleapis.com. - The network must allow packets to be sent to the IP addresses for thedefault domains.
- To connect to VMs through their external IP address, theVirtual Private Cloud (VPC) mustallow TCP ingress traffic for IP range
0.0.0.0/0. - To connect to VMs through their internal IP address, the VPCmust useIAP.
Limitations
- Not supported within VPC Service Controls perimeters. SSH-in-browser isn'tsupported within VPC Service Controls perimeters. Use the gcloud CLIinstead. For more information, seeConnect to Linux VMs orConnecting to a serial console,depending on your use case.
- Slow SSH key transfer times. SSH-in-browser key transfer times range from2 to 25 seconds.
- Intermittent disconnects. At this time, we don't offer a specificService Level Agreement (SLA) for connection lifetimes. If you plan to keepthe terminal window open for an extended period of time, use terminalmultiplexers liketmux orscreen.
- Keyboard shortcuts close the window. The following keyboard shortcutsclose the SSH-in-browser window:
- On Windows and Linux workstations:
Ctrl+W - On macOS workstations:
Cmd+W - On Chrome OS workstations:
Ctrl+Shift+W
- On Windows and Linux workstations:
- File transfer might be slow for large files. If you experience slow filetransfer times, use the
gcloud compute scpcommand instead ofSSH-in-browser.
Use SSH-in-browser
Connect to VMs
To learn how to use SSH-in-browser to connect to a VM, reviewConnect to Linux VMs.
To learn how to use SSH-in-browser to connect to a Cloud TPU, reviewConnecting to a Cloud TPU VM.
Connect to VMs that don't have public IP addresses
To connect to VMs that have only internal IP addresses, followChoose a connection option for internal-only VMs.
Connect to VMs with user-uploaded SSH keys
SSH-in-browser supports connections with user-uploaded ECDSA SSH keys for VMs that useOS Login.
To connect to a VM with auser-uploaded SSH key, dothe following:
In the Google Cloud console, go to theVM instances page.
In the list of VMs, click the drop-down next totheSSH button of the VM that you want to connect to.
ClickOpen in browser window using provided private SSH key.
The SSH-in-browser window opens.
ClickConnect with SSH key file and choose the private key fileassociated with the public key in your OS Login profile.
Disconnect from VMs
To disconnect from a VM and terminate an SSH-in-browser session, run theexitcommand.
Scroll through the terminal
You can scroll the terminal using your mouse wheel or trackpad. Alternatively,you can use the keyboard shortcuts for your workstation's operating system.
Windows and Linux
To scroll up, useCtrl+Shift+PageUp. To scroll down, useCtrl+Shift+PageDn.
macOS
To scroll up, useFn+Shift+Up. To scroll down, useFn+Shift+Down.
Chrome OS
To scroll up, useAlt+Shift+Up. To scroll down, useAlt+Shift+Down.
Copy and paste text
The default copy option for SSH-in-browser isCopy on select. Any text youhighlight in SSH-in-browser is copied. You can alternatively copy and paste thetext using the keyboard shortcuts for your workstation's operating system.
Windows and Linux
To copy text, useCtrl+C. To paste text, useCtrl+V.
macOS
To copy text, useCmd+C. To paste text, useCmd+V.
Chrome OS
There is no keyboard shortcut to copy files. To paste text, useCtrl+Shift+V.
If you encounter problems copying and pasting large blocks of text, usefile transfer instead.
Transfer files
To learn how to transfer files to and from VMs using SSH-in-browser, reviewTransfer files using SSH-in-browser.
Troubleshoot
To find methods and tools for diagnosing and resolving failed SSH connections,seeTroubleshooting SSH.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.