Skip to main content

VM access methods

Overview

There are two ways to connect to a running VM. Pick whichever fits the situation.

MethodCharacteristicsBest for
Web consoleConnect from the browserA quick session with no SSH setup
SSHTerminal-based, most generalDay-to-day development and operations

Web console

You can open a terminal directly from the browser, without a public IP or SSH setup.

  1. Under Compute > Virtual Machines, pick a running VM.
  2. Click the Web Console tab.
  3. Sign in with your username and password.

Web console

Web console requirements
  • The VM must be in the Running state (in other states you'll see "Please try again in a moment")
  • Your account must have Web Console Access permission (built-in roles all have it)
  • The session TTL is 30 minutes; use the Reconnect button to re-establish when it expires

SSH

Password authentication

ssh <username>@<public-ip>

Example SSH session in a terminal

If it fails to connect, see SSH connection issues.

Using an SSH key instead of a password is both safer and more convenient.

Step 1: Generate an SSH key locally

ssh-keygen -t ed25519 -C "my-eci-key"

Step 2: Copy the public key to the VM

ssh-copy-id <username>@<public-ip>

Step 3: Connect with the key

ssh -i ~/.ssh/id_ed25519 <username>@<public-ip>

Next steps