Can't SSH into GCP VMs

300 views
Skip to first unread message

Saumya Saumya

unread,
Jan 5, 2022, 10:19:47 AM1/5/22
to gce-discussion
Hello all,
I can't SSH into new or old GCP VMs. 
I have tried using Chrome SSH consol, third party tools like Putty etc with new keys configured in "Metadata".

Regards
Saumya

Saumya Saumya

unread,
Jan 5, 2022, 2:50:53 PM1/5/22
to gce-discussion
Here is the solution & steps i used...and it worked.
-----------------------------------------------------------------------------------
Access GCP VMs via Serial port, if normal SSH is not working or taking long time.

Assumptions:-

a) You have GNOME or some other Graphical viewer enabled on VM e.g. Debian10 or Ubuntu version with Graphical View.


1- Enable serial port via Metadata.

** Process for the same is explained in this document - https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-using-serial-console 

Bottom line is - add a new key-value pair in Metadata

key - serial-port-enable, value- TRUE

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 you normally would do.


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. 


8- Now, open https://remotedesktop.google.com/access and select 1st option i.e. "Remote Access". 

9- Click on it and provide your pin. ** you may save the pin.

Digil (Google Cloud Platform Support)

unread,
Jan 5, 2022, 3:30:49 PM1/5/22
to gce-discussion
Hello Saumya,

Thank you for updating this discussion thread with the detailed steps you have followed to resolve the SSH issue. I am grateful for the amount of time and effort you put into this. It is going to help other community members. 

As you probably know, SSH issues are common. There could be various reasons behind the failure of SSH connectivity. Feel free to refer to Google Cloud Platform's official troubleshooting document and this discussion thread for your future reference. 
Reply all
Reply to author
Forward
0 new messages