ssh - gcloud ssh -- 没有可用的受支持的身份验证方法(服务器发送 : publickey)

标签 ssh google-cloud-platform gcloud

我正在尝试遵循一个简单的 ssh 连接到描述的实例的过程 here .
不幸的是,我不断收到此错误:

 Server refused our key FATAL
ERROR: Disconnected: No supported authentication methods available
(server sent: publickey)

看起来我做的一切都是正确的。
  • 我创建了一个新的 ubuntu 实例
  • 尝试使用 $ gcloud compute username@ssh example-instance --zone us-central1-a 登录
  • 收到将生成 ssh key 的警告
    WARNING: You do not have an SSH key for Google Compute Engine.
    WARNING: [C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\sdk\winkeygen.exe] will be executed to generate a key.
    Updated [https://www.googleapis.com/compute/v1/projects/sharp-kayak-120708].
    
  • 我收到上面提到的错误
    Server refused our key
    FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
    

  • 我看到在本地机器和实例上创建的 key (gcloud 将它们添加到元数据 -> SSH key )。网络设置中允许使用 SSH。

    我尝试了一种替代路线 here :
  • 使用 gcloud 生成 ssh
  • 添加到选美
  • 使用 PuTTY 的 SSH
  • 同样的错误:
    No supported authentication methods available
        (server sent: publickey)
    

  • 真的很感激你的想法。

    最佳答案

    感谢 George 的帮助 与周围的工作 :https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!topic/gce-discussion/uAPNpkBJXi4

    这里的分步指南:

  • 下载 PuTTY 和 PuTTYgen。
  • 使用 PuTTYgen 生成 key 。将评论框中的文本替换为您的 Windows 用户名。将窗口中的代码复制并粘贴到项目和实例的 SSH key 中(转到实例,编辑,向下滚动到 SSH key 列表并单击“添加”)(不确定两者是否都需要)。不要使用密码短语。
  • 另外,另存为私钥文件。为方便起见,将其保存在 C:\Users\.ssh 文件夹中。 PuTTY 需要这种格式的 key 才能工作。
  • 打开腻子。将 key 添加到 session :Connection>SSH>Auth>Browse.. 指向您刚刚在 .ssh 中创建的新生成的 key 文件。
  • 设置 session 。输入 IP 地址。此时值得保存 - 它会记住 IP 和 key 。
  • 打开...
  • 登录为:... 输入您在 key 生成器中添加为注释的 Windows 用户名。

  • 我现在开始运行了!期待修复,让“google compute ssh 命令工作!错误报告:https://code.google.com/p/google-cloud-sdk/issues/detail?id=546

    关于ssh - gcloud ssh -- 没有可用的受支持的身份验证方法(服务器发送 : publickey),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35420053/

    相关文章:

    node.js - 如何使用存储桶存储在 google flex/app engine 环境中提供静态文件?

    google-cloud-platform - 如何将静态 ip 转移到另一个 gcloud 项目

    node.js - 使用npm程序调用dialogflow API失败

    macos - 在不同的 Mac 上使用 SSH key

    Linux 须藤,[ Ant :sshexec] Remote command failed with exit status 127

    c - 用C浏览远程linux服务器上的目录

    linux - 如何清除 SSH ProxyCommand 保持打开状态的连接?

    google-cloud-platform - GCS : Manually trigger "object created" event

    google-cloud-platform - Terraform 生命周期忽略元数据中的 SSH key

    mysql - Google Cloud MySQL 托管实例使用 100% CPU 数小时。什么在使用它?