gcloud ssh - 没有支持的验证方法可用(服务器发送:publickey) [英] gcloud ssh -- No supported authentication methods available (server sent: publickey)

查看:894

报告。



这个问题在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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆