binbeobo / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 1 forks source link

gcloud ssh connected but no response on running unix commands #414

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am ssh from gcloud to my gcloud instance but on running commands, no output 
shows 

But I can see output from web terminal provided in dev.console.

Attached is the screenshot of both (web & ubuntu terminal). 

Original issue reported on code.google.com by kr.un...@gmail.com on 3 Dec 2015 at 7:46

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for the report.

What gcloud command did you use to ssh onto the instance in your terminal?

Do you have multiple instances with the same name (perhaps in different zones)?

Original comment by vil...@google.com on 3 Dec 2015 at 7:53

GoogleCodeExporter commented 8 years ago
thank you for quick look. 

$ gcloud init
$ gcloud compute ssh fluid_admin@instance-1

No, I have only one instance on zone-no 8. instance name: instance-1. 

Actually it was working until I re-installed my ubuntu os & gcloud. 

Original comment by kr.un...@gmail.com on 3 Dec 2015 at 8:05

GoogleCodeExporter commented 8 years ago
Please run the following:

gcloud compute instances list instance-1

How many results are shown?

If there is only one, are you sure you are using that instance on dev console?

Also, are you using the same project on dev console and gcloud?

Original comment by vil...@google.com on 3 Dec 2015 at 8:25

GoogleCodeExporter commented 8 years ago
attached screenshot of above command response. 

You can see the url of my first screenshot  which can tell you the instance I 
am connected from web. 

Yes. same project from browser & from terminal. 

Original comment by kr.un...@gmail.com on 3 Dec 2015 at 9:33

Attachments:

GoogleCodeExporter commented 8 years ago
My colleague just spotted your problem! You are logging using two different 
user accounts (fluid-admin vs. fluid-amdin). You will notice it is 
'fluid-admin@instance1' on dev console and 'fluid-amdin@instance1' on the 
terminal.

Original comment by vil...@google.com on 3 Dec 2015 at 9:52

GoogleCodeExporter commented 8 years ago
oops. sorry for wasting your time. 

But how come it is logged in with new user which is not even created. 

shouldn't it throw error which issues ssh command ?

Original comment by kr.un...@gmail.com on 3 Dec 2015 at 9:58

GoogleCodeExporter commented 8 years ago
No problem.

The 'gcloud compute ssh [username@]instance-name' command will log on to the 
instance with the username provided (or the username currently being used on 
the terminal). If that username does not exist on the instance, it creates an 
account with that username, and then logs on. 

It is optimized for a quick getting started experience where you want to create 
an instance and easily log in with 'gcloud compute ssh instance-name'.

Original comment by vil...@google.com on 3 Dec 2015 at 11:16