TIL: SSH key comment determines login in GCP

When you create a new VM in GCP and add a SSH key to it then the VM will create a new login based on the comment of that SSH key. For instance…

ssh-rsa LOTSOFBASE64 username

The public key shown above would result in a new login “username” on the VM. While this is documented in the compute docs it surprised me since Azure explicitly asks for the username that should be used when creating an administrative account.