致命错误:已断开连接:没有可用的支持身份验证方法(服务器已发送:publickey)(FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey))

一整天都在苦苦挣扎。

在本演练之后,尝试在googles计算引擎上将SFTP设置为新VM。

第1步很好。

步骤2似乎生成键确定但我不会被要求一个密码短语然后我得到以下内容:

如果我在生成密钥后重新运行命令,我会得到以下内容:

我发现了几个有相同错误的问题,但没有解决问题的任何问题。

我已经尝试登录GCE控制台并手动添加ssh密钥,但错误仍然存​​在。

我已经尝试删除整个项目并以相同的结果重新开始。

我试过继续和Filezilla连接 - 显然不起作用。

串行控制台的输出:

Feb 23 19:15:21 magento-test sshd[8643]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key Feb 23 19:15:22 magento-test sshd[8643]: error: buffer_get_bignum2_ret: negative numbers not supported [preauth] Feb 23 19:15:22 magento-test sshd[8643]: error: key_from_blob: can't read rsa key [preauth] Feb 23 19:15:22 magento-test sshd[8643]: error: userauth_pubkey: cannot decode key: ssh-rsa [preauth] Feb 23 19:15:22 magento-test sshd[8643]: error: Received disconnect from 151.227.74.143: 14: No supported authentication methods available [preauth]

更新****

由于这个问题 ,我已经取得了一些进展,这已经解决了一个已知错误,它允许我创建一个ssh密钥并在putty中获得一个活动连接。

然而,我仍然坚持获得SFTP访问,使用相同的密钥(通过putty连接)我只是暂停

Status: Connecting to 104.155.66.130... Response: fzSftp started, protocol_version=4 Command: keyfile "C:\Users\Ben\.ssh\google_compute_engine.ppk" Command: open "Ben@104.155.66.130" 22 Error: Connection timed out after 20 seconds of inactivity Error: Could not connect to server

任何帮助都赞赏

Been struggling with this all day.

Trying to set up SFTP to a new VM on googles compute engine following this walkthrough.

Step 1 is fine.

Step 2 seems to generate the keys OK but i dont get asked for a pass phrase & then i get the following:

If i then re-run the command after the keys are generated i get the following:

I've found a few questions with the same error but not anything thats fixed the issue.

I've tried logging into GCE console and adding the ssh keys manually but the error remains.

I've tried removing the whole project and starting again with the same result.

I've tried continuing & connecting with Filezilla - obviously doesn't work.

Output from Serial Console:

Feb 23 19:15:21 magento-test sshd[8643]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key Feb 23 19:15:22 magento-test sshd[8643]: error: buffer_get_bignum2_ret: negative numbers not supported [preauth] Feb 23 19:15:22 magento-test sshd[8643]: error: key_from_blob: can't read rsa key [preauth] Feb 23 19:15:22 magento-test sshd[8643]: error: userauth_pubkey: cannot decode key: ssh-rsa [preauth] Feb 23 19:15:22 magento-test sshd[8643]: error: Received disconnect from 151.227.74.143: 14: No supported authentication methods available [preauth]

UPDATE ****

I've made some progress thanks to this question, this has given a work around for a known bug, which has allowed me to create an ssh key & get an active connection in putty.

However i'm still stuck with getting SFTP access, using the same key (that connects through putty) I just get a timeout

Status: Connecting to 104.155.66.130... Response: fzSftp started, protocol_version=4 Command: keyfile "C:\Users\Ben\.ssh\google_compute_engine.ppk" Command: open "Ben@104.155.66.130" 22 Error: Connection timed out after 20 seconds of inactivity Error: Could not connect to server

Any help at all appreciated

最满意答案

这是GCE的一个已知问题 ,已针对下一版Google Cloud SDK 98.0.0进行了修复

This is a known issue with GCE and has been fixed for the next version of Google Cloud SDK 98.0.0

更多推荐