Search code examples
google-cloud-platformgoogle-compute-enginegoogle-iam

How to open ssh gcloud vm session from the browser to another account


I have a VM instance setup in Google Cloud. Most of the time I use gcloud tool to open ssh session from the terminal, it uses a user account on the VM with the same name as the account I am connecting from.

When, however, I open an SSH session from the browser it uses another user account on the VM, the one with the same name as the email I use to login to google cloud from the browser.

I would like to open the session from the browser and to log into the another account of my choice, the one I open from the terminal for instance.

How can I manage that?


Solution

  • Thank you for all responses, Nick and Lin. Actually, I have just found what I was looking for: after I open ssh session in my browser window, in its upper right corner the 'cog' settings allow me to "Change Linux Username". With that I was able to switch.