1

I have two VM instances in google console developer. I can able to open by ssh for instance-1.At the same time i can't able to connect instance-2 through the browser. I got the following error.

enter image description here

But i can able to open through terminal ( ssh user@ipaddress ) for particular user.

Please tell me the solution for this.

Booth
  • 488
  • 2
  • 4
  • 11

1 Answers1

1

While you're trying to SSH to your VM instance from the Browser, click on the gear icon on top-right side of the SSH window, click on Change Linux Username and enter that particular username which you mentioned you can use it to SSH to your VM instance through terminal.

If this works then the issue is that you're allowing only specific users to SSH to your VM instance.

When SSHing from the Browser, by default, a username for SSH sessions is generated from the email address logged into the account, omitting the domain information. For example, if an email is jane.doe@gmail.com, the corresponding username would be jane_doe.

Make sure the username generated from your email address logged into the account is allowed to SSH to your VM instance.

Kamran
  • 1,425
  • 7
  • 17
  • I gave lot of username which i have already can access through ssh command. Even though i tried with new usernames, but i can't login. – Booth Jul 14 '15 at 13:43
  • At the same time i can access user1 at instance-1 and can't at instance -2 through gcloud command. Both instance 1 & 2 keys, permissions are same.But it still struggling to connect. – Booth Jul 14 '15 at 13:49
  • visit this article where you can find more information about SSHing from the Browser: cloud.google.com/compute/docs/ssh-in-browser – Kamran Jul 14 '15 at 19:13
  • Yes. You are right.But i done this which you mentioned before command. Is there any way to solve this problem? – Booth Jul 15 '15 at 09:44
  • check the VM's serial console and see if you can find errors related to SSH? – Kamran Jul 15 '15 at 14:07
  • It doesn't show error related output – Booth Jul 16 '15 at 09:45