gpt4 book ai didi

ssh - 无法执行无密码认证 ssh

转载 作者:行者123 更新时间:2023-12-02 14:30:23 25 4
gpt4 key购买 nike

创建一对 key 并通过 ssh-copy-id 将公钥发送到服务器后,我仍然无法在没有密码的情况下登录

ssh -v user@host 的输出

  • debug1:在/home/pumba/.ssh/known_hosts:1
  • 中找到 key
  • debug1:在 134217728 个 block 后重新生成 key
  • debug1: SSH2_MSG_NEWKEYS 已发送
  • debug1:期待 SSH2_MSG_NEWKEYS
  • debug1:在 134217728 个 block 后重新生成 key
  • debug1:收到 SSH2_MSG_NEWKEYS
  • debug1:收到 SSH2_MSG_EXT_INFO
  • debug1: kex_input_ext_info: server-sig-algs=
  • debug1:收到 SSH2_MSG_SERVICE_ACCEPT
  • debug1:可以继续的身份验证:publickey,password
  • debug1:下一个认证方式:公钥
  • debug1:提供 RSA 公钥:/home/pumba/.ssh/id_rsa
  • debug1:可以继续的身份验证:publickey,password
  • debug1:尝试私钥:/home/user/.ssh/id_dsa
  • debug1:尝试私钥:/home/pumba/.ssh/id_ecdsa
  • debug1:尝试私钥:/home/pumba/.ssh/id_ed25519
  • debug1:下一个认证方式:密码
  • 最佳答案

    调试 SSH 无密码身份验证:
    详细 Debug模式运行-vvv

    ssh -vvv user@host


    使用特定 key 运行

    ssh -i private_key user@host


    检查文件权限

    ~./ssh permissions should be 700

    ~./ssh should be owned by your account

    ~/.ssh/authorized_keys permissions should be 600

    ~/.ssh/authorized_keys should be owned by your account


    客户端权限:

    /.ssh/config permissions should be 600

    ~/.ssh/id_* permissions should be 600


    检查您的私钥是否与公钥匹配

    Local: ssh-keygen -y -f ~/.ssh/id_rsa

    Server: cat ~/.ssh/authorized_keys

    关于ssh - 无法执行无密码认证 ssh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48876839/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com