We run a small handful of Debian servers on Google Cloud Platform. New servers we setup, we're able to add SSH keys at the point of creation and access the machines via SSH without a problem. Older machines (read created in the last 1-3 months) we're having issues accessing them via SSH.As a test case, I've created a brand new id_rsa keypair on my local Mac using ssh-keygen and added the public key to GCP. My IP is allowed to access the box and my user is in the AllowUsers in ssh_config.Here is the output when I run ssh -i ~/.ssh/*KEY* *USER*@*IP* -p *PORT* -vOpenSSH_6.9p1, LibreSSL 2.1.8debug1: Reading configuration data /Users/me/.ssh/configdebug1: /Users/me/.ssh/config line ****: Applying options for ****IP****debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line ****: Applying options for *debug1: /etc/ssh/ssh_config line ****: Applying options for *debug1: Connecting to ****IP**** [****IP****] port ****PORT****.debug1: Connection established.debug1: identity file /Users/me/.ssh/gcp type 1debug1: key_load_public: No such file or directorydebug1: identity file /Users/me/.ssh/gcp-cert type -1debug1: identity file /Users/me/.ssh/gcp type 1debug1: key_load_public: No such file or directorydebug1: identity file /Users/me/.ssh/gcp-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_6.9debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1debug1: match: OpenSSH_6.7p1 pat OpenSSH* compat 0x04000000debug1: Authenticating to ****IP****:****PORT**** as '****USERNAME****'debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: server->client chacha20-poly1305@openssh.com <implicit> nonedebug1: kex: client->server chacha20-poly1305@openssh.com <implicit> nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: xxxdebug1: Host '[****IP****]:****PORT****' is known and matches the ECDSA host key.debug1: Found key in /Users/me/.ssh/known_hosts:1debug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: Roaming not allowed by serverdebug1: SSH2_MSG_SERVICE_REQUEST sentdebug1: SSH2_MSG_SERVICE_ACCEPT received*********************************************************************                                                                  ** This system is for the use of authorized users only.  Usage of   ** this system may be monitored and recorded by system personnel.   **                                                                  ** Anyone using this system expressly consents to such monitoring   ** and is advised that if such monitoring reveals possible          ** evidence of criminal activity, system personnel may provide the  ** evidence from such monitoring to law enforcement officials.      **                                                                  *********************************************************************debug1: Authentications that can continue: publickeydebug1: Next authentication method: publickeydebug1: Offering RSA public key: /Users/me/.ssh/gcpdebug1: Authentications that can continue: publickeydebug1: Offering RSA public key: /Users/me/.ssh/gcpdebug1: Authentications that can continue: publickeydebug1: No more authentication methods to try.Permission denied (publickey).  Despite my key being found, it appears my local client isn't trying to authenticate after connecting. I'm unsure as to whether or not this is a problem with GCP not adding my public key to the server properly, or whether or not my local machine is doing something wrong. Google appear to have changed the way they handle keys in the last few months (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys#metadatavalues) but I seem to be doing everything correctly yet am unable to connect.
SSH publickey permission denied (Google Cloud Platform)
ssh;key authentication;google cloud