如何解决权限被拒绝(公钥)错误



我正在克隆ghost开放博客cms,可以选择通过数字海洋运行vps。选择此方法将创建液滴。下一步是以身份登录root@XXXXX

在这样做的时候,我得到了可怕的拒绝许可(公钥(。我重新创建了ssh密钥,并在数字海洋中进行了更新,但这并没有解决问题。

运行ssh -v root@xxxx命令时,输出如下:

OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to xxx [xxx] port 22.
debug1: Connection established.
debug1: identity file /Users/dad/.ssh/id_rsa type 0
debug1: identity file /Users/dad/.ssh/id_rsa-cert type -1
debug1: identity file /Users/dad/.ssh/id_dsa type -1
debug1: identity file /Users/dad/.ssh/id_dsa-cert type -1
debug1: identity file /Users/dad/.ssh/id_ecdsa type -1
debug1: identity file /Users/dad/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/dad/.ssh/id_ed25519 type -1
debug1: identity file /Users/dad/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/dad/.ssh/id_xmss type -1
debug1: identity file /Users/dad/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.2
debug1: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.2 pat OpenSSH* compat 0x04000000
debug1: Authenticating to xxx as 'root'
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: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ecNEC3rocsntZyTMyGGH7MHfMoMufrPOmG8hPRgkwzs
debug1: Host 'xxx' is known and matches the ECDSA host key.
debug1: Found key in /Users/dad/.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: /Users/dad/.ssh/id_rsa RSA SHA256:/2EjDyRz3HYYyLqEegdjzEy2PfgIGnMNXvwbPzMgRqg
debug1: Will attempt key: /Users/dad/.ssh/id_dsa
debug1: Will attempt key: /Users/dad/.ssh/id_ecdsa
debug1: Will attempt key: /Users/dad/.ssh/id_ed25519
debug1: Will attempt key: /Users/dad/.ssh/id_xmss
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/dad/.ssh/id_rsa RSA SHA256:/2EjDyRz3HYYyLqEegdjzEy2PfgIGnMNXvwbPzMgRqg
debug1: Authentications that can continue: publickey
debug1: Trying private key: /Users/dad/.ssh/id_dsa
debug1: Trying private key: /Users/dad/.ssh/id_ecdsa
debug1: Trying private key: /Users/dad/.ssh/id_ed25519
debug1: Trying private key: /Users/dad/.ssh/id_xmss
debug1: No more authentication methods to try.
root@xxxxx: Permission denied (publickey).

知道如何处理这个问题吗?

我已经解决了这个问题,并将解释如何解决。

我的问题是,即使在液滴中重置了密码,我的密码也没有被接受。

"控制台中不接受密码";信息可以在这里找到https://docs.digitalocean.com/products/droplets/resources/troubleshooting-ssh/authentication/

我按照引导进入恢复过程链接到这里:https://docs.digitalocean.com/products/droplets/resources/recovery-iso/#boot-进入回收iso

  • 关闭电源或停止液滴
  • 选择从恢复启动ISO
  • 再次打开液滴
  • 单击控制台

在这个阶段,我有一个选项列表。

  1. 装载磁盘映像[未装载]
  2. 检查文件系统
  3. 重置Droplet根密码
  4. 配置键盘
  5. 尝试"chroot"到已安装的系统
  6. 交互式Shell[/bin/bash]选择(1-6(并按Enter键继续
  • 我选择了选项1,然后是3,然后是6。

  • 在这之后,我关闭了液滴并选择从硬盘启动。

  • 访问控制台时,我可以登录并输入密码,密码被接受,幽灵安装开始并成功完成。

我希望这能帮助任何遇到同样问题的人。

相关内容

  • 没有找到相关文章

最新更新