树莓派SSH连接华硕RT-AC1300G PLUS路由器失败:无互签算法问题求助
树莓派SSH连接华硕RT-AC1300G PLUS路由器失败:无互签算法问题求助
大家好,我最近碰到个SSH连接的难题,想请教下各位:
- 我用的是华硕RT-AC1300G PLUS路由器,之前在Windows PC上用
ssh-keygen生成了RSA密钥对,把公钥配置到路由器的设置里(不管是web界面还是路由器的authorized_keys文件都确认存在),从PC连接路由器完全正常,没任何问题。 - 但换成树莓派连接的时候,一直弹
Permission denied (publickey),看debug日志的话,会显示debug1: send_pubkey_test: no mutual signature algorithm。 - 我试过把PC上能用的密钥对复制到树莓派上用,结果还是一样的错误;甚至直接在树莓派上重新生成新的密钥对,问题依旧存在。
- 后来我还尝试用ed25519密钥,但路由器根本不接受,查了下才知道Dropbear在2019.78版本还没支持ed25519,这也说得通。
下面是各设备的SSH版本信息:
- PC端
ssh -V输出:OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 - 树莓派端
ssh -V输出:OpenSSH_9.2p1 Debian-2+deb12u1, OpenSSL 3.0.11 19 Sep 2023 - 路由器端
ssh -V输出:Dropbear v2019.78
附上相关的debug日志片段:
PC连接成功的日志片段(执行ssh user@host -vvv)
debug1: Offering public key: D:\\id_rsa_pi4router_pcgen RSA SHA256:toeuBlcfX2juW8AjDCntufrSvx9U1MRFcKNTmDBszEQ explicit debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 60 debug1: Server accepts key: D:\\id_rsa_pi4router_pcgen RSA SHA256:toeuBlcfX2juW8AjDCntufrSvx9U1MRFcKNTmDBszEQ explicit
树莓派连接失败的日志片段(用同一密钥)
debug1: Offering public key: /home/ndr/.ssh/id_rsa_pi4router_pcgen RSA SHA256:toeuBlcfX2juW8AjDCntufrSvx9U1MRFcKNTmDBszEQ explicit debug1: send_pubkey_test: no mutual signature algorithm debug2: we did not send a packet, disable method debug1: No more authentication methods to try.
尝试ed25519密钥的日志片段
debug1: Offering public key: /home/ndr/.ssh/id_ed25519 ED25519 SHA256:LzXxVd/VRoB/QKE5OXjKk+pR69B2HT+x0nS/EfIRL3U explicit debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 51 debug1: Authentications that can continue: publickey debug2: we did not send a packet, disable method debug1: No more authentication methods to try.
有没有大佬能帮忙分析下问题出在哪,怎么解决呀?谢谢大家!
备注:内容来源于stack exchange,提问作者Acat1728
相关产品推荐
相关产品推荐

