Change username for web ssh login on OS Login

1147 views
Skip to first unread message

George Brooke

unread,
Jul 16, 2018, 9:03:48 AM7/16/18
to gce-discussion
I frequently use the web ssh client to connect to my cloud instances to do stuff. One thing that's annoyed me for quite a while is that as far as I can tell is that there is no way to log in as a specific user besides using su after logging in which has a few issues. With OS Login it is made worse by the fact that the username has changed from what it was before (x -> x_gmail_com) and i legit can't find a way to change it. Anything i'm missing?

Veera (Google Cloud Support)

unread,
Jul 17, 2018, 12:11:49 PM7/17/18
to gce-discussion
Hello George,

You can manually add new username/SSH key pair in Metadata -> SSH Keys section. Alternatively, you can log into an instance and provide a new username called beta using the following command:

$ gcloud compute ssh beta@debian --zone us-central1-f

User ‘beta’ will automatically be added into Metadata -> SSH Keys and user ‘beta’ will be able to SSH into all the instances. 
Reply all
Reply to author
Forward
0 new messages