How to update SSH key system in old instances? (SSH key propagation)

352 views
Skip to first unread message

Ray Foss

unread,
Dec 30, 2017, 9:52:10 PM12/30/17
to gce-discussion
I have a few old instances that don't support the new `Metadata -> SSH Keys` feature, they will only update authorized_keys through the `sshKeys` metadata. Is there any way to update them so that I don't need to keep dealing with sshKeys medadata token and just use the  `Metadata -> SSH Keys`  tab?

I noticed you've deleted the old documentation on the migration :/

Navi Aujla (Google Cloud Support)

unread,
Dec 31, 2017, 2:48:02 PM12/31/17
to gce-discussion
Hello Ray 

Are you able to connect to your VM instances? 

This issue report comment seems related to your question. "There should be no need to move the SSH keys:  Whether they are displayed in the Metadata tab or the SSH Keys tab has no bearing on their availability to the instance." In case if you are encountering error related to VM guest environment is outdated, refer to this issue report providing details on several causes and potential fixes. 

Ray Foss

unread,
Dec 31, 2017, 8:25:40 PM12/31/17
to gce-discussion
Thanks for the link. Like some people in the link, the metadata entry works and I can get into the instances. It looks like to fix the problem I have to update the package gce-compute-image-packages, but 7 instances that I'm having the problem with run Centos. The only one with debian can't find the package "sudo apt-get install gce-compute-image-packages"

I really wish you had left upgrade instructions somewhere, it's clearly a common deprecation problem

Navi Aujla (Google Cloud Support)

unread,
Jan 1, 2018, 1:15:43 PM1/1/18
to gce-dis...@googlegroups.com
Here [1] is the detailed public documentation on the updating Linux guest environment which also includes instructions for the Debian OS. 

I hope it helps. 

[1] https://cloud.google.com/compute/docs/instances/linux-guest-environment

changal rayudu

unread,
Aug 8, 2018, 1:15:31 AM8/8/18
to gce-discussion
Hi ,
 I have same problem with Debain 7. When I click on SSH on GCP console am able to ssh from other terminals/gshell, SSH permission  denied. I see we have documentation  Debain 8 and 9 to updated Gust Environment. 

Do we have any documentation to fix sshKeys issue from local systems terminal (mac) for Debain 7 SSH issue

The VM guest environment is outdated and only supports the deprecated 'sshKeys' metadata item. Please follow the steps here to update.


I appreciate your help 


SMP Debian 3.2.65-1+deb7u1 x86_64 GNU/Linux

sudo apt-get update && sudo apt-get install gce-compute-image-packagesHit http://gce_debian_mirror.storage.googleapis.com wheezy Release.gpgHit http://gce_debian_mirror.storage.googleapis.com wheezy Release Get:1 http://security.debian.org wheezy/updates Release.gpg [1601 B] Get:2 http://security.debian.org wheezy/updates Release [52.3 kB] Hit http://gce_debian_mirror.storage.googleapis.com wheezy/main Sources Hit http://gce_debian_mirror.storage.googleapis.com wheezy/main amd64 Packages Hit http://gce_debian_mirror.storage.googleapis.com wheezy/main Translation-en Hit http://security.debian.org wheezy/updates/main Sources Hit http://security.debian.org wheezy/updates/main amd64 Packages Hit http://security.debian.org wheezy/updates/main Translation-en Hit http://http.debian.net wheezy Release.gpg Hit http://http.debian.net wheezy ReleaseHit http://http.debian.net wheezy/main SourcesHit http://http.debian.net wheezy/main amd64 PackagesHit http://http.debian.net wheezy/main Translation-enFetched 53.9 kB in 2s (19.7 kB/s)Reading package lists... DoneReading package lists... DoneBuilding dependency tree Reading state information... DoneE: Unable to locate package gce-compute-image-packages

Rahi (Google Cloud Support)

unread,
Aug 8, 2018, 5:37:13 PM8/8/18
to gce-dis...@googlegroups.com
Hi Changal,

You can follow the steps mentioned in comment #9 at this Public Issue Tracker link. This should solve your issue.
Reply all
Reply to author
Forward
0 new messages