GCE: cannot login, The VM guest environment is outdated and only supports the deprecated 'sshKeys' metadata item

前端 未结 6 1589
没有蜡笔的小新
没有蜡笔的小新 2021-02-20 02:45

I cannot ssh into my Google Compute Engine (GCE) Wordpress instance anymore. It was working one month ago when I tried last. I use the Google built-in SSH client in a Chrome bro

相关标签:
6条回答
  • 2021-02-20 03:16

    If you're seeing this on Debian 8 or 9, the most likely reason for this is that the google-compute-engine.* packages that allow SSH access to the instance have been removed by apt-get autoremove.

    If you have an open SSH connection to the machine or can use a tool like gcloud, running apt-get update && sudo apt-get install gce-compute-image-packages should fix this.

    If you no longer have any SSH access, there is a procedure available on the GCP docs site that can be used to restore it.

    0 讨论(0)
  • 2021-02-20 03:17

    I've created a bug report here for this.

    0 讨论(0)
  • 2021-02-20 03:26

    recent days, I meet similar problem, later I find the permission rights of my home directory fools me, as a lazy-bone, I chmod 777 ~ After did that, I cannot ssh via my terminal, even cannot ssh via browser, only get 'The VM guest environment is outdated and only supports the deprecated 'sshKeys' metadata item, Plese follow the steps here to update'. Sounds like you must set 755 to your home dir, not just care your 700 .ssh or 600 authorized_keys.

    0 讨论(0)
  • 2021-02-20 03:28

    It looks like your instance's disk is full, and so the SSH keys can't be created in the temp directory. You can do the following:

    1. Stop your instance and wait for it to shut down
    2. Click on the disk your instance is using, and choose "edit" at the top
    3. Enter a larger disk size, and save
    4. Go back to your instance and start it up again

    You should now be able to connect via SSH. While you're in there, check to see what filled up your hard disk so you can prevent this from happening again (maybe a rogue program is printing out too many logs, etc).

    0 讨论(0)
  • 2021-02-20 03:36

    I met the similar issue after I created a FreeBSD VM, gcloud ssh not works, but I am lucky that I can use the browser window ssh to my VM. Then I manually add the google_compute-engine public key to the .ssh/authorized_keys, now it work, I can use the gcloud ssh to connect. But not sure if this is a better/security way.

    0 讨论(0)
  • 2021-02-20 03:37

    Might be a bit late, but you can

    1) Stop the VM

    2) Edit and enable serial console

    3) Use the serial connection to login and update the VM

    0 讨论(0)
提交回复
热议问题