0

I have a google virtual machine of ubuntu 16. I used to login from my window 10 laptop, by opening the web browser for google console/compute engine page. And click the ssh button on my VM. And I remembered that under my VM instance details page, the SSH Keys column is None.

This works fine for hundreds of times until yesterday I tried to login via gcloud sdk command prompt. Using this command:

gcloud compute ssh my_instance

Because I tried to download a large file through scp from VM. And after that, I cannot login via ssh button on my browser again. Every time it's just staying at the connecting page forever, keep transferring ssh keys to the VM. When it works fine before, this page just appear for a few second and then I am login to the VM. Now it stays there forever. I tried to shut down and restart my VM but it still doesn't work.

Now I can only login via gcloud compute ssh command. But this seems like a different system as my previous one. All the files, folders looked the same. But many software aren't there. For example, when I login via ssh button on browser, I have installed jupyter, docker, samtools etc. And I can reuse them each time I logout and relogin. But this time when I login via gcloud ssh, I cannot use these software. The system said I don't have them installed.

How can I resume my previous login method? Thanks.

Luke
  • 46
  • 4
Yue Hou
  • 1
  • 1

2 Answers2

0

Try to use another user:

gcloud compute ssh [USER]@example-instance

where [USER] is a new username to log in with and if that doesn´t work try to create another instance using an snapshot of the disk.

gcloud compute instances delete old-instance --keep-disks=boot
gcloud compute instances create new-instance --disk name=DISK,boot=yes,auto-delete=no
gcloud compute ssh new-instance
Luke
  • 46
  • 4
0

The technician said my boot-disk is full and that's why I cannot login via ssh button. But I can still login in via gcloud compute ssh, which makes me confused. Anyway, the technician helped me to create a new instance with larger size from my old image's snapshot, as Luke suggested. And now I can login to my new instance and work from there.

Yue Hou
  • 1
  • 1