SSH into the VM
Now that the VM is running, we need to connect to it using Secure Shell Protocol (SSH) and Google Cloud Command Line Interface (CLI)
Step 3: Open a Command Prompt
Open command line terminal such as Command Prompt (Windows) or Terminal (Mac). Type the following command:
> gcloud compute ssh...[Redacted]
(Authorized users can access the full command here.)
This command does several things:
- Makes an SSH connection to the specified GCP compute engine (i.e., the VM)
- Indicates the regional zone where this VM exists
- Configures port forwarding so that the VM can be accessed. Note this port number. You’ll need it again shortly.
You need to have Google Cloud CLI installed for this to work. If the command failed, install the CLI first and try again. Note that you should be able to install this at a user level without needing Adminstrator priviledges. You can always verify installation with:
gcloud --version
A new PuTTY window should open with your username, the U.S. Government information system banner message, and authentication. You may need to authenticate the first time.
Keep this window open as long as you are accessing the VM. Closing it will disconnect you.