无法连接到远程计算机。验证 SSH 服务连接详细信息。所有配置的身份验证方法均失败

Sek*_*kai 3 ssh azure-pipelines

我的 Azure 管道 SSH 配置工作正常,直到我将 ubuntu 从 Ubuntu20 升级到 Ubuntu 22。现在我收到以下消息: ##[error]Failed to connect to the remote machine. Verify the SSH service connection details. Error: Error: All configured authentication methods failed.

我该如何调试这个?我可以使用我的 ssh 密钥 ssh 到我的服务器,没有任何问题。

有没有办法让我更多地了解该问题并进行调试?

此外,Azure pipeline 上有这样的公告:

Azure DevOps 继续推出更改,以永久禁用通过 TLS 1.0、TLS 1.1 和 TLS 1.2 弱密码套件进行的通信。如果您的工具依赖于旧版 TLS 来与 Azure DevOps 进行通信,请采取必要的操作来启用 TLS 1.2,如博客中所述。

这可能有关系吗?非常感谢所有帮助。

小智 15

这个解决方案对我有用。

key type ssh-rsa not in PubkeyAcceptedAlgorithms
Run Code Online (Sandbox Code Playgroud)

通过添加导致解决方案,

PubkeyAcceptedKeyTypes=+ssh-rsa
Run Code Online (Sandbox Code Playgroud)

/etc/ssh/sshd_config重新启动 sshd。

似乎较新的 Ubuntu 22.04 已更改默认接受的密钥类型,尽管 SSH 命令工作正常,但该插件不再工作。