Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

SSH access problems with GCP VM

I think, everyone faces this problem..... that, there is some wiered problem accessing GCP VMs via SSH, either via VM page, or while using third party SSH tools.

I am compiling the solution steps as i used from some different sources, forums and support documents from Google. 

Access VMs via Serial port, if normal SSH doesn't work.

1- Enable serial port via Metadata.
Process for the same is explained here - https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-using-serial-console
2- Click open the VM's page and click "Connect via Serial Port". (may be, a stop/start be required).
** It might take some time to become alive. After connection is established, you will get access to the normal CLI.
** Provide your username and password and proceed as normal.

3- go to https://remotedesktop.google.com/access and login via your google profile.
** More details are here in this document - https://cloud.google.com/architecture/chrome-desktop-remote-on-compute-engine

4- Select 3rd option - Set up via SSH.
5- In the "Set up another computer", click "Begin" and then "Next" and then "Authorise".
6- As per your GCP VM, choose/copy the command. This command, you need to run into your VM's CLI prompt as normal user.
7- It will ask to set a 6 digit pin and reconfirm it.
** Set the pin and send the pin and your password over to me by mail........ No, don't do it. :-D.

8- Now, open https://remotedesktop.google.com/access and select 1st option i.e. "Remote Access".
** Your VM will show up in the list. If it does, it's a **** Bingo **** moment.
9- Click on it and provide your pin. ** you may save the pin.

 

Anyone, any comments or additions??

 

Regards

Saumya

Solved Solved
0 3 8,161
1 ACCEPTED SOLUTION

The steps to resolve VM Access problems are given above in the post itself.... if it helps someone.

View solution in original post

3 REPLIES 3

The steps to resolve VM Access problems are given above in the post itself.... if it helps someone.

Got folowing error when trying this solution. I can't seem to be able to connect to the console

console .png

After setting up in MetaData, I still cannot ssh and there's a warning of `Connecting to serial ports is disabled `. Additionally there's a message on the top:

 

Some features are restricted to comply with your project's or organization's data sovereignty requirements.
  • Serial port console button is disabled by the org policy compute.disableSerialPortAcces

I'm using a federated account.