binbeobo / google-cloud-sdk

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

[osx yosemite] Can't connect on google cloud node using gcloud compute ssh #331

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Issue running command [gcloud compute ssh].

What steps will reproduce the problem?

What is the expected output? What do you see instead?

Please provide any additional information below.

Traceback (most recent call last):
  File "calliope/cli.py", line 592, in Execute
    result = args.cmd_func(cli=self, args=args)
  File "calliope/backend.py", line 1223, in Run
    resources = command_instance.Run(args)
  File "compute/subcommands/ssh.py", line 154, in Run
    use_account_service=self._use_accounts_service)
  File "shared/compute/ssh_utils.py", line 479, in ActuallyRun
    has_keys = self.EnsureSSHKeyIsInProject(user)
  File "shared/compute/ssh_utils.py", line 292, in EnsureSSHKeyIsInProject
    self.messages, user, public_key, existing_metadata)
  File "shared/compute/ssh_utils.py", line 173, in _AddSSHKeyToMetadataMessage
    constants.SSH_KEYS_METADATA_KEY: _PrepareSSHKeysValue(ssh_keys)},
  File "shared/compute/ssh_utils.py", line 155, in _PrepareSSHKeysValue
    return '\n'.join(keys)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 401: 
ordinal not in range(128)

Installation information:

Google Cloud SDK [0.9.83]

Platform: [Mac OS X, x86_64]
Python Version: [2.7.10 (default, Aug 28 2015, 07:26:38)  [GCC 4.2.1 Compatible 
Apple LLVM 6.0 (clang-600.0.56)]]
Site Packages: [Disabled]

Installation Root: [/Users/alexandre/google-cloud-sdk]
Installed Components:
  core: [2015.10.16]
  core-nix: [2015.09.03]
  kubectl: []
  gcloud: [2015.10.16]
  gsutil-nix: [4.14]
  gsutil: [4.15]
  bq: [2.0.18]
  bq-nix: [2.0.18]
  kubectl-darwin-x86_64: [1.0.6]
[output truncated]

Original issue reported on code.google.com by asso...@kairosagency.com on 22 Oct 2015 at 12:39

GoogleCodeExporter commented 8 years ago
Thank you for the feedback. Could you please post the contents of your *public* 
key so that we can further debug this issue? You should be able to find it at: 
~/.ssh/google_compute_engine.pub 

Original comment by vil...@google.com on 22 Oct 2015 at 7:45

GoogleCodeExporter commented 8 years ago
Ok I realized it might be related to my computer hostname :-/

ssh-rsa 
AAAAB3NzaC1yc2EAAAADAQABAAABAQC9TXU0cBaqC5yNiyFTp7xx9K6KfCGoydg1/jH4CNaMMxTGntuv
WvUVe/PyTSHYkn6X0qpojiJQkHQ7tvIcdoZkFlmE9YMSICpshCfJhNEqDIO2CkHOgKV+xu2thH36yO3P
JddXiZ8JM9u6DXhCo2f4tNW6aCv3hKZZBr86aMfhBjyVKWjugQeovwikJPWItXBmoX/mNFli9XqVr5jF
jkj7ucK9Jx66FuRKRIrrfN9A33QqGQFZz+g3cy2uC8dKhRWCcb5YcYYNdgxd4qA7xf6sjXotb3kR6hSY
I2BMqTjUVQztafDemoFcbBnZxvUMQnscLgiG4VD+gSNgchg7FmDb 
alexandre@┌∩┐tOk┌∩┐

I'll try to generate a new key with a custom host and rename it 
google_cloud_sdk.pub, it might work with that

Original comment by asso...@kairosagency.com on 23 Oct 2015 at 8:11

GoogleCodeExporter commented 8 years ago
You could also just edit the .pub file and change the hostname yourself; it's 
there more for you than for SSH, so it doesn't matter if it doesn't match your 
hostname.

We'll look into making sure that this case is supported in a future Cloud SDK 
release.

(In general, I'd advise against a hostname that's not all-ASCII. While I agree 
that it *should* be supported everywhere, the reality is that it's not.)

Original comment by z...@google.com on 23 Oct 2015 at 1:25

GoogleCodeExporter commented 8 years ago
Thanks for the tip, I wasn't sure if the hostname was used by ssh.

Original comment by asso...@kairosagency.com on 23 Oct 2015 at 1:29

GoogleCodeExporter commented 8 years ago

Original comment by stephe...@google.com on 17 Dec 2015 at 6:19

GoogleCodeExporter commented 8 years ago
Issue 455 has been merged into this issue.

Original comment by z...@google.com on 4 Jan 2016 at 1:15

GoogleCodeExporter commented 8 years ago
Issue 172 has been merged into this issue.

Original comment by z...@google.com on 4 Jan 2016 at 2:22

GoogleCodeExporter commented 8 years ago
We have a fix for this that will go out in the 92.0.0 release.

Original comment by z...@google.com on 4 Jan 2016 at 9:26