不能使用gcloud ssh到实例中

时间:2015-01-28 20:04:12

标签: ssh google-compute-engine

我在gcloud中设置了一个新实例。但是我无法使用gcloud compute ssh instance-name命令。详细的控制台输出是:

debug2: bits set: 511/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: .....@..... (0x7fb5c12289f0)
debug2: key: ...../.ssh/id_rsa ((nil))
debug2: key: ...../.ssh/id_dsa ((nil))
debug2: key: ...../.ssh/id_ecdsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: gssapi-keyex
debug1: No valid Key exchange context
debug2: we did not send a packet, disable method
debug1: Next authentication method: gssapi-with-mic
debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found

debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found

debug1: Unspecified GSS failure.  Minor code may provide more information


debug1: Unspecified GSS failure.  Minor code may provide more information
Credentials cache file '/tmp/krb5cc_1000' not found

debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Offering RSA public key: ....@....
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Trying private key: ....../.ssh/id_rsa
debug1: Trying private key: ....../.ssh/id_dsa
debug1: Trying private key: ....../.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

我尝试了很多东西,我找到的方法之一就是将我的密钥添加到项目的元数据中......但Google不应该为你做那些吗?无论如何它对我不起作用,我尝试在〜/ .ssh..still中创建一个新的google_cloud_compute.pub。有什么建议吗?

1 个答案:

答案 0 :(得分:4)

解决了! :)

在我的本地计算机上,使用

ssh-add ~/.ssh/google_compute_engine

然后尝试了命令。工作就像一个魅力!