无法使用 Ubuntu One 登录 Ubuntu Core 22

无法使用 Ubuntu One 登录 Ubuntu Core 22

我无法从 WSL2 默认 Ubuntu 安装连接到 RPi Ubuntu Core 22 20220610.2。下载链接(以及任何其他 Ubuntu 版本)。它一直要求我输入密码。密码应该是什么?

john@LAPTOP-LUVS8UFH:~$ ssh [email protected]
The authenticity of host '192.168.1.134 (192.168.1.134)' can't be established.
ED25519 key fingerprint is SHA256:mMZ72EXUnB3s6fD747EG7KWEVDo7yoYp7+WV/TI+oTk.
This host key is known by the following other names/addresses:
    ~/.ssh/known_hosts:1: [hashed name]
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.134' (ED25519) to the list of known hosts.
[email protected]'s password:
Permission denied, please try again.

我记得我之前可以连接,但我不明白我该怎么做才能触发密码提示。此外,在 RPi 上重新安装 Ubuntu Core 22 也没有改变任何东西。

  • 是的,我在主目录中生成的所有公钥都ssh-keygen添加到了 Ubuntu One。我
  • 我从主目录和 .ssh 目录直接运行 ssh 命令 - 行为相同。我还尝试了此命令并提供我的私钥: ssh -i id_rsa [email protected]
  • 我甚至在 WSL 上创建了一个新的 Ubuntu 20。但是没有运气。

有什么提示吗?


来自的日志ssh -v [email protected]

OpenSSH_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 192.168.1.134 [192.168.1.134] port 22.
debug1: Connection established.
debug1: identity file /home/john/.ssh/id_rsa type 0
debug1: identity file /home/john/.ssh/id_rsa-cert type -1
debug1: identity file /home/john/.ssh/id_dsa type -1
debug1: identity file /home/john/.ssh/id_dsa-cert type -1
debug1: identity file /home/john/.ssh/id_ecdsa type -1
debug1: identity file /home/john/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/john/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/john/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/john/.ssh/id_ed25519 type -1
debug1: identity file /home/john/.ssh/id_ed25519-cert type -1
debug1: identity file /home/john/.ssh/id_ed25519_sk type -1
debug1: identity file /home/john/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/john/.ssh/id_xmss type -1
debug1: identity file /home/john/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3
debug1: match: OpenSSH_8.9p1 Ubuntu-3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 192.168.1.134:22 as 'john987456'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:x8gTmBpwcHA4Ig7FwThJiXWHaE7vAIvQVrJoMCl+f3A
debug1: Host '192.168.1.134' is known and matches the ECDSA host key.
debug1: Found key in /home/john/.ssh/known_hosts:1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/john/.ssh/id_rsa RSA SHA256:7gUhzYDbhkI/yRDboz5U3ROP7ULYNoDJCBGHEu7/dqI
debug1: Will attempt key: /home/john/.ssh/id_dsa
debug1: Will attempt key: /home/john/.ssh/id_ecdsa
debug1: Will attempt key: /home/john/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/john/.ssh/id_ed25519
debug1: Will attempt key: /home/john/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/john/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected]>
debug1: kex_input_ext_info: [email protected] (unrecognised)
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/john/.ssh/id_rsa RSA SHA256:7gUhzYDbhkI/yRDboz5U3ROP7ULYNoDJCBGHEu7/dqI
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/john/.ssh/id_dsa
debug1: Trying private key: /home/john/.ssh/id_ecdsa
debug1: Trying private key: /home/john/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/john/.ssh/id_ed25519
debug1: Trying private key: /home/john/.ssh/id_ed25519_sk
debug1: Trying private key: /home/john/.ssh/id_xmss
debug1: Next authentication method: password
[email protected]'s password:

将 Ubuntu Core 22 64Bit 直接从 Raspberry Pi Imager 软件写入 RPi 后,它就起作用了。见图。不知道为什么这两个版本会有所不同。 在此处输入图片描述

答案1

我一直被同样的事情困扰。

可行的解决方案是

  1. 将 ssh-key 添加到帐户
  2. 对 ubuntu 核心进行全新安装。

我不明白为什么它这么笨。我不明白为什么我没有在设备上进行任何身份验证,而只是输入 ID(电子邮件)。但这样它就起作用了。

注意,我以前使用 ed25519 密钥,但这里我按照建议使用了 rsa无法在 ubuntu core 22 上登录 ssh. 带有 id 的注释(ubuntu-one 中的电子邮件)。

我不确定这是否重要:)

相关内容