I use the Google Compute Engine Web Console to remote into my instance. I can perform root operations using "sudo", but what if I wanted to "su" to root?
I created a user "test", and now want to log-in as "test" -- this doesn't work as I have not yet generated SSH keys. Where do I find these keys for instance creator and/or root as well?
Also, I used a Debian image, but few commands appear to be installed by default. For instance, locate, updatedb, etc are missing? How do I get these?
You asked several questions in a single post; I'll answer them in order.
(1) I use the Google Compute Engine Web Console to remote into my instance. I can perform root operations using "sudo", but what if I wanted to "su" to root?
Use: sudo su -
(2) I created a user "test", and now want to log-in as "test" -- this doesn't work as I have not yet generated SSH keys. Where do I find these keys for instance creator and/or root as well?
You can ssh via gcloud compute ssh
or by clicking on the "SSH" button on the web UI, and then run: sudo su test
.
(3) Also, I used a Debian image, but few commands appear to be installed by default. For instance, locate, updatedb, etc are missing? How do I get these?
To install missing packages, you'll have to use the standard Debian command apt-get
to install the packages, e.g.:
$ sudo apt-get install [name-of-package]
To find a package name using keywords, use:
$ apt-cache search [keyword]
Note: the first thing you want to do on a brand-new instance is to update your package metadata cache by running:
$ sudo apt-get update
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With