Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Linux
É possível se conectar a instâncias de máquina virtual (VM) do Compute Engine no
console Google Cloud usando a ferramenta SSH no navegador. O SSH no navegador não
exige nenhuma extensão ou software adicional. O SSH no navegador oferece suporte a
conexõescom VMs que armazenam
chaves SSH em metadados,
VMs que usam o
Login do SO eque usam o IAP para encaminhamento de TCP.
Cada vez que você se conecta a uma VM usando SSH no navegador, o Compute Engine cria um par de chaves temporário e define um nome de usuário para a conexão.
O nome de usuário e o local onde o Compute Engine armazena as chaves SSH dependem do uso de chaves SSH armazenadas nos metadados ou do login do SO.
Para mais informações, consulte Sobre conexões SSH.
Requisitos
Para usar o SSH no navegador, seu ambiente precisa atender aos seguintes requisitos:
Os proxies HTTPS e os dispositivos de segurança não podem descriptografar e recriptografar o tráfego
usando o próprio certificado TLS. Por exemplo, para realizar a inspeção TLS.
A rede precisa permitir o tráfego de e para nomes de host terminados em google.com,
gstatic.com ou googleapis.com.
A rede precisa permitir que os pacotes sejam enviados para os endereços IP dos
domínios padrão.
Para se conectar às VMs por meio do endereço IP interno, a VPC precisa usar o IAP.
Limitações
Não é compatível com perímetros do VPC Service Controls. O SSH no navegador não é compatível com os perímetros do VPC Service Controls. Em vez disso, use a gcloud CLI Para mais informações, consulte
Conectar-se a VMs do Linux ou
Como se conectar a um console serial,
dependendo do seu caso de uso.
Tempos de transferência de chave SSH lentos. O tempo de transferência de chave SSH no navegador varia de 2 a 25 segundos.
Desconexões intermitentes. No momento, não oferecemos um contrato de nível de serviço (SLA) específico para ciclos de vida da conexão. Se você pretende manter a janela do terminal aberta por um período prolongado, use multiplexadores de terminal, como tmux ou screen.
Os atalhos do teclado fecham a janela. Os atalhos de teclado a seguir
fecham a janela SSH no navegador:
Em estações de trabalho do Windows e do Linux: Ctrl+W
Em estações de trabalho do macOS: Cmd+W
Em estações de trabalho do ChromeOS: Ctrl+Shift+W
A transferência de arquivos grandes pode ser lenta. Se você tiver tempos de transferência
de arquivos lentos, use o
comando gcloud compute scp em vez do
SSH no navegador.
Na lista de VMs, clique no menu suspenso arrow_drop_down ao lado
do botão SSH da VM a que você quer se conectar.
Clique em Abrir na janela do navegador usando a chave SSH privada fornecida.
A janela SSH no navegador será aberta.
Clique em Conectar com o arquivo de chave SSH e escolha o arquivo de chave privada
associado à chave pública no perfil do Login do SO.
Desconectar das VMs
Para se desconectar de uma VM e encerrar uma sessão SSH no navegador, execute o comando
exit.
Rolar pelo terminal
É possível rolar o terminal usando a roda do mouse ou o trackpad. Também
é possível usar os atalhos de teclado adequados ao sistema operacional da estação de trabalho.
Windows e Linux
Para rolar para cima, use Ctrl+Shift+PageUp. Para rolar para baixo, use
Ctrl+Shift+PageDn.
macOS
Para rolar para cima, use Fn+Shift+Up. Para rolar para baixo, use Fn+Shift+Down.
Chrome OS
Para rolar para cima, use Alt+Shift+Up. Para rolar para baixo, use Alt+Shift+Down.
Copiar e colar texto
A opção de cópia padrão para SSH no navegador é Copiar ao selecionar. Qualquer texto destacado no SSH no navegador será copiado. Como alternativa, você pode copiar e colar o
texto usando os atalhos de teclado do sistema operacional da sua estação de trabalho.
Windows e Linux
Para copiar o texto, use Ctrl+C. Para colar o texto, use Ctrl+V.
macOS
Para copiar o texto, use Cmd+C. Para colar o texto, use Cmd+V.
Chrome OS
Não há atalho de teclado para copiar arquivos. Para colar o texto, use
Ctrl+Shift+V.
Se você tiver problemas para copiar e colar grandes blocos
de texto, use a transferência de arquivos.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-03 UTC."],[[["\u003cp\u003eSSH-in-browser allows direct connection to Compute Engine VMs from the Google Cloud console without additional software, supporting SSH keys in metadata, OS Login, and IAP for TCP forwarding.\u003c/p\u003e\n"],["\u003cp\u003eTo use SSH-in-browser, the environment must have a supported web browser, the VM must have the guest environment installed, and the network must allow traffic to specific Google domains and IP addresses.\u003c/p\u003e\n"],["\u003cp\u003eSSH-in-browser has limitations such as not being supported within VPC Service Controls perimeters, slow SSH key transfer times, intermittent disconnects, and specific keyboard shortcuts that close the window.\u003c/p\u003e\n"],["\u003cp\u003eUsers can connect to VMs with user-uploaded SSH keys by selecting "Open in browser window using provided private SSH key" in the Google Cloud console and choosing the corresponding private key file.\u003c/p\u003e\n"],["\u003cp\u003eUsers can transfer files, copy and paste text, and scroll the terminal using designated shortcuts, and can disconnect from a VM session by using the \u003ccode\u003eexit\u003c/code\u003e command.\u003c/p\u003e\n"]]],[],null,["Linux\n\n*** ** * ** ***\n\nYou can connect to Compute Engine virtual machine (VM) instances from within\nthe Google Cloud console by using the SSH-in-browser tool. SSH-in-browser doesn't\nrequire any additional extensions or software. SSH-in-browser supports\nconnections to VMs that store\n[SSH keys in metadata](/compute/docs/instances/ssh#metadata),\nVMs that use\n[OS Login](/compute/docs/instances/ssh#os-login), and\nVMs that use\n[IAP for TCP forwarding](/iap/docs/using-tcp-forwarding#tunneling_ssh_connections).\n\nEach time you connect to a VM by using SSH-in-browser, Compute Engine\ncreates an ephemeral key pair and sets a username for your connection.\nYour\nusername and the location where Compute Engine stores your SSH keys\ndepend on whether you use SSH keys stored in metadata, or OS Login.\n\nFor more information see [About SSH connections](/compute/docs/instances/ssh).\n\nRequirements\n\nTo use SSH-in-browser, your environment must meet the following requirements:\n\n- Google Cloud console must be running in a [supported web browser](/compute/docs/console#supported_browsers).\n- The VM you're connecting to must have the [guest environment](/compute/docs/images/guest-environment) [installed and running](/compute/docs/images/install-guest-environment). The guest environment is pre-installed on VMs that you create from [Google-provided public images](/compute/docs/images#os-compute-support).\n- Your network must meet the following requirements:\n\n - HTTPS proxies and security devices must not decrypt and re-encrypt traffic using their own TLS certificate, for example, to perform TLS inspection.\n - The network must allow traffic to and from hostnames ending in `google.com`, `gstatic.com`, or `googleapis.com`.\n - The network must allow packets to be sent to the IP addresses for the default domains.\n - To connect to VMs through their external IP address, the Virtual Private Cloud (VPC) must [allow TCP ingress traffic for IP range\n `0.0.0.0/0`](/vpc/docs/using-firewalls#common-use-cases-allow-ssh).\n - To connect to VMs through their internal IP address, the VPC must use [IAP](#connect_to_vms_that_dont_have_public_ip_addresses).\n\nLimitations\n\n- **Not supported within VPC Service Controls perimeters.** SSH-in-browser isn't supported within VPC Service Controls perimeters. Use the gcloud CLI instead. For more information, see [Connect to Linux VMs](/compute/docs/connect/standard-ssh) or [Connecting to a serial console](/compute/docs/troubleshooting/troubleshooting-using-serial-console#gcloud_2), depending on your use case.\n- **Slow SSH key transfer times.** SSH-in-browser key transfer times range from 2 to 25 seconds.\n- **Intermittent disconnects.** At this time, we don't offer a specific Service Level Agreement (SLA) for connection lifetimes. If you plan to keep the terminal window open for an extended period of time, use terminal multiplexers like [tmux](https://tmux.github.io/) or [screen](http://www.gnu.org/software/screen/).\n- **Keyboard shortcuts close the window.** The following keyboard shortcuts close the SSH-in-browser window:\n - On Windows and Linux workstations: `Ctrl+W`\n - On macOS workstations: `Cmd+W`\n - On Chrome OS workstations: `Ctrl+Shift+W`\n- **File transfer might be slow for large files.** If you experience slow file transfer times, use the [`gcloud compute scp` command](/sdk/gcloud/reference/compute/scp) instead of SSH-in-browser.\n\nUse SSH-in-browser\n\nConnect to VMs\n\nTo learn how to use SSH-in-browser to connect to a VM, review\n[Connect to Linux VMs](/compute/docs/instances/connecting-to-instance#console).\n\nTo learn how to use SSH-in-browser to connect to a Cloud TPU, review\n[Connecting to a Cloud TPU VM](/tpu/docs/managing-tpus-tpu-vm#tpu-connect).\n\nConnect to VMs that don't have public IP addresses\n\nTo connect to VMs that have only internal IP addresses, follow\n[Choose a connection option for internal-only VMs](/compute/docs/connect/ssh-internal-ip).\n\nConnect to VMs with user-uploaded SSH keys\n\nSSH-in-browser supports connections with user-uploaded ECDSA SSH keys for VMs that use\n[OS Login](/compute/docs/oslogin).\n\nTo connect to a VM with a\n[user-uploaded SSH key](/compute/docs/connect/add-ssh-keys#os-login), do\nthe following:\n\n1. In the Google Cloud console, go to the **VM instances** page.\n\n [Go to VM Instances](https://console.cloud.google.com/compute/instances)\n2. In the list of VMs, click the\n arrow_drop_down drop-down next to\n the **SSH** button of the VM that you want to connect to.\n\n3. Click **Open in browser window using provided private SSH key**.\n\n The SSH-in-browser window opens.\n4. Click **Connect with SSH key file** and choose the private key file\n associated with the public key in your OS Login profile.\n\nDisconnect from VMs\n\nTo disconnect from a VM and terminate an SSH-in-browser session, run the `exit`\ncommand.\n\nScroll through the terminal\n\nYou can scroll the terminal using your mouse wheel or trackpad. Alternatively,\nyou can use the keyboard shortcuts for your workstation's operating system. \n\nWindows and Linux\n\nTo scroll up, use `Ctrl+Shift+PageUp`. To scroll down, use\n`Ctrl+Shift+PageDn`.\n\nmacOS\n\nTo scroll up, use `Fn+Shift+Up`. To scroll down, use `Fn+Shift+Down`.\n\nChrome OS\n\nTo scroll up, use `Alt+Shift+Up`. To scroll down, use `Alt+Shift+Down`.\n\nCopy and paste text\n\nThe default copy option for SSH-in-browser is **Copy on select**. Any text you\nhighlight in SSH-in-browser is copied. You can alternatively copy and paste the\ntext using the keyboard shortcuts for your workstation's operating system. \n\nWindows and Linux\n\nTo copy text, use `Ctrl+C`. To paste text, use `Ctrl+V`.\n\nmacOS\n\nTo copy text, use `Cmd+C`. To paste text, use `Cmd+V`.\n\nChrome OS\n\nThere is no keyboard shortcut to copy files. To paste text, use\n`Ctrl+Shift+V`.\n\nIf you encounter problems copying and pasting large blocks of text, use\n[file transfer](#transferbrowser) instead.\n\nTransfer files\n\nTo learn how to transfer files to and from VMs using SSH-in-browser, review\n[Transfer files using SSH-in-browser](/compute/docs/instances/transfer-files#transferbrowser).\n\nTroubleshoot\n\nTo find methods and tools for diagnosing and resolving failed SSH connections,\nsee [Troubleshooting SSH](/compute/docs/troubleshooting/troubleshooting-ssh)."]]