Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

username of google cloud instance - where to find out [closed]

My gmail account I used to create my google cloud instance is [email protected].

When I tried to connect to instance with WinSCP using "johnsmith" it failed, but it worked with "JOHN.SMITH"? Where can I find out my exact username for google cloud instance?

UPDATE. I tried web-based SSH and typed whoami, it returned "johnsmith". "john.smith" is my windows local username. It is all very confusing.

ANOTHER UPDATE: My google cloud instance is Ubuntu 16.04 and I am connecting from Windows 7 local machine

P.S. I made up the name, but preserved format for this question.

P.S.S SO does not let me post because I don't meet their standard. Here is some bogus code to meet the standard:

print("Hello, World!")
like image 319
user1700890 Avatar asked Dec 13 '17 16:12

user1700890


People also ask

How do I find my cloud instance ID?

Viewing your instance ID and CRN in the IBM Cloud consoleGo to Menu > Resource List, and then click Services to browse a list of your cloud services. Click the table row. This opens the resources table side panel, where you can see the CRN and instance GUID. Click on the instance name link.

What is instance ID in GCP?

This ID is unique within the project and zone. [INSTANCE_NAME] : the name of the instance to which this token belongs. If your project uses zonal DNS, this name can be reused across zones, so use a combination of the project_id , zone , and the instance_id values to identify a unique instance ID.

How does GCP track user activity?

Viewing logs Activity logging is enabled by default for all Compute Engine projects. You can see your project's activity logs through the Logs Explorer in the Google Cloud console: In the console, go to the Logging page. When in the Logs Explorer, select and filter your resource type from the first drop-down list.


3 Answers

Just to clarify, I presume you are trying to connect to a Compute Engine Windows Instance in your Google Cloud Platform project, is that correct?

In order to confirm the username of this instance I would recommend following these instructions:

1) Login to Google Cloud Platform Console at this link https://console.cloud.google.com/

2) In the Console main menu (the three horizontal stripes in the top left corner) navigate to 'Compute Engine' and then click on 'VM instances'.

3) You should now be able to see the name of your VM instance- click on it.

4) You will now be in the "VM instance details" screen.

Windows

5) If you now click on "Set Windows Password" a new pane will open that contains your username to login to the instance.

6) If you now press "Set" in the same window, you will receive your Windows password (copy or make note of this).

By using the username and password you retrieved in step 5 and 6 you will be able to access the instance.

You now also have the option of pressing "RDP" in the "VM instance details" page to gain access to your instance via RDP and change your username/password to something more memorable once you have access to the operating system.

Linux

Alternatively, if you are trying to disover the username of a Linux VM Instance, you can confirm this by accessing the machine via SSH from the Console. You will then be able to set the password of the machine.

To SSH into the machine, follow the same first 4 steps in the above instructions, then:

  • Click on "SSH". A new terminal window will open and you will gain access the machine.
  • You will be able to see your username in the shell, or alternatively you can type whoami in the shell and after pressing enter it will print out your username.
  • To set a password for the machine, type sudo passwd then press return. You will then be prompted to enter a new password.
like image 85
neilH Avatar answered Oct 24 '22 12:10

neilH


Under Cloud Shell Session:

gcloud compute os-login describe-profile

You will see your username.

like image 30
Jack Kuang Avatar answered Oct 24 '22 11:10

Jack Kuang


In GCP, I created Ubuntu 18.04 disk/instance (and created a discourse forum in it). I found that when we create a new instance, there is a bar/panel on the right side of the screen, which showed our credentials to login into that instance/website. But I found no way to invoke that details screen again (I can remember that it listed all the software components went into my disk/instance installation).

Anyway, I remembered the username was 'user', but didn't keep record of the auto generated long alphanumeric password. But at last, found the same passsword, when I clicked on the instance name and without clicking on any further, where custom data details start, first line showed the password, labelled: Bitnami-base-password. If its still not clear where to find the pw, check out the SS

like image 30
Bathinda Helper Avatar answered Oct 24 '22 11:10

Bathinda Helper