本文介绍了gcloud ssh - 没有支持的验证方法可用(服务器发送:publickey)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图按照:


  1. 使用gcloud生成ssh

  2. 将其添加到pageant中
  3. 使用PuTTY的SSH

  4. 同样的错误:

     没有支持的认证方法可用
    (服务器发送:publickey)


非常感谢您的意见。

报告。



这个问题在Cloud SDK Release 98.0.0中得到了解决。它包括识别损坏的Windows密钥文件并在运行中重新生成它们的补救措施。



问题出在 google-cloud-sdk\bin\sdk\\ \\winkeygen.exe 即可。它在生成的 .ppk .pub 文件中对公钥模数表示进行了修改。然后ssh服务器将模数解释为签名的bignum并保存。

I am trying to follow a simple process of ssh'ing to the instance that is described here.Unfortunately I keep getting this error:

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

It looks like I do everything correctly.

  1. I create an new ubuntu instanse
  2. Try to log in using $ gcloud compute username@ssh example-instance --zone us-central1-a
  3. Getting a warning that ssh key is going to be generated

    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].
    

  4. I get the error mentioned above

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

I see the keys created on both, local machine and instance (gcloud adds them to Metadata -> SSH keys). SSH is allowed in network settings.

I have tried an alternative route described here:

  1. generate ssh using gcloud
  2. add it to pageant
  3. SSH using PuTTY
  4. same error:

    No supported authentication methods available
        (server sent: publickey)
    

Would really appreciate your ideas.

解决方案

Thanks for the reports.

The problem is fixed in Cloud SDK Release 98.0.0. It includes remediation that recognizes corrupt Windows key files and regenerates them on the fly.

The problem was in google-cloud-sdk\bin\sdk\winkeygen.exe. It botched the public key modulus representation in the generated .ppk and .pub files. The ssh server then interpreted the modulus as a signed bignum and bailed.

这篇关于gcloud ssh - 没有支持的验证方法可用(服务器发送:publickey)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 15:30