instance82736-long-term-xyz-archive-0332893
.gsutil ls
from the command line returns nothing, as the service account is lacking the storage.buckets.list
IAM permission. However, if you ran gsutil ls gs://instance82736-long-term-xyz-archive-0332893
you may find a complete filesystem backup, giving you clear-text access to data that your local Linux account lacks.compute.instances.setMetadata
(to affect a single instance)compute.projects.setCommonInstanceMetadata
(to affect all instances in the project)https://www.googleapis.com/auth/compute
https://www.googleapis.com/auth/cloud-platfo
rm~/.ssh/authorized_keys
file of an existing user or will create a new user with sudo
rights.meta.txt
.alice
from above. We'll generate a new key for ourselves like this:meta.txt
imitating the format:alice
as follows:/etc/passwd
to target?sudo
. Scripted, the process would look like this:google-sudoers
group, and start a new SSH session. While it is quick and easy, it may end up making more changes to the target system than the previous methods.gcloud compute ssh [INSTANCE]
to use your current username on other boxes.enable-oslogin = TRUE
.enable-oslogin-2fa = TRUE
.sudo
is granted.gcloud compute ssh [INSTANCE]
command to connect manually as the service account. Two-factor is only enforced when using user accounts, so that should not slow you down even if it is assigned as shown above.gcloud
commands using an account more powerful than your own. You'll need local root to do this.gcloud
config directories exist in users' home folders.gcloud
folder to a machine you control and running gcloud auth list
to see what accounts are now available to you.