Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用密钥登录OpenWRT会认证失败 #387

Open
WolfCanglong opened this issue Jun 11, 2024 · 7 comments
Open

用密钥登录OpenWRT会认证失败 #387

WolfCanglong opened this issue Jun 11, 2024 · 7 comments

Comments

@WolfCanglong
Copy link

描述BUG

用密码登录没问题,密钥登录Ubuntu之类好像也没问题,就是登录OpenWRT提示

认证失败,请检查密码/密钥/主机/用户等是否错误

```sh
SSHAuthFailError(All authentication methods failed)

这个密钥用win自带的ssh登录没问题,转成ppk用winscp/putty之类的也可以正常登录,RSA的应该没啥兼容性问题吧

复现步骤

1.配置一个到Openwrt的连接,用密钥认证
2.点登录
3.看到错误

期望结果

正常登录

实际结果

认证失败,请检查密码/密钥/主机/用户等是否错误

```sh
SSHAuthFailError(All authentication methods failed)

截图

设备

949版 Android/Windows都是一样的表现

更多信息

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: Using a key to log in to OpenWRT will cause authentication failure.

DESCRIPTION BUG

There seems to be no problem logging in with a password, and there seems to be no problem logging in to Ubuntu using a key, but it just prompts when logging in to OpenWRT.

Authentication failed, please check whether the password/key/host/user, etc. are incorrect.

```sh
SSHAuthFailError(All authentication methods failed)

This key can be used to log in with the ssh that comes with win. If you convert it to ppk and use winscp/putty or the like, you can log in normally. There should be no compatibility issues with RSA.

Steps to reproduce

  1. Configure a connection to Openwrt and authenticate with a key
  2. Click to log in
  3. See the error

Desired result

Log in normally

actual results

Authentication failed, please check whether the password/key/host/user, etc. are incorrect.

```sh
SSHAuthFailError(All authentication methods failed)

screenshot

equipment

Version 949 Android/Windows have the same performance

More information

@zizzdog
Copy link

zizzdog commented Jun 26, 2024

同问题,OpenWrt基于19.07版本,使用RSA 2048密钥对,juicessh与DaRemote均能正常登录,但是用最新安卓版出现题主的错误。
顺带说一下,软件好像不支持直接导入xshell和juicessh的私钥文件。

xshell私钥文件结构如下:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,9F12066615EF50B4

......
-----END RSA PRIVATE KEY-----

报错提示:Unsupported operation: Unsupported cipher:DES-EDE3-CBC

juicessh私钥文件结构如下:

-----BEGIN PRIVATE KEY-----
......
-----END PRIVATE KEY-----

报错提示:Unsupported operation: Unsupported key type:PRIVATE KEY

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I have the same problem. OpenWrt is based on version 19.07 and uses the RSA 2048 key pair. Both juicessh and DaRemote can log in normally, but the error mentioned in the question occurs when using the latest version.

@WolfCanglong
Copy link
Author

看了大家说的我发现我的确实也是19.07,试了下23.05没这个问题,不过还是应该修下吧 毕竟19.07用得多,而且别的软件确实也都能连

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


After reading what everyone said, I found that mine is indeed 19.07. I tried 23.05 and it didn’t have this problem, but it should be fixed. After all, 19.07 is used a lot, and other software can indeed be connected.

@WolfCanglong
Copy link
Author

同问题,OpenWrt基于19.07版本,使用RSA 2048密钥对,juicessh与DaRemote均能正常登录,但是用最新安卓版出现题主的错误。 顺带说一下,软件好像不支持直接导入xshell和juicessh的私钥文件。

xshell私钥文件结构如下:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,9F12066615EF50B4

......
-----END RSA PRIVATE KEY-----

报错提示:Unsupported operation: Unsupported cipher:DES-EDE3-CBC

juicessh私钥文件结构如下:

-----BEGIN PRIVATE KEY-----
......
-----END PRIVATE KEY-----

报错提示:Unsupported operation: Unsupported key type:PRIVATE KEY

找到解决办法 openwrt上装个openssh-server就行 会自动把dropbear换掉(公钥路径不一样记得先拷到/root/.ssh)
核心问题就是这软件不支持dropbear 推测是有些版本ssh认为rsa不安全拒了 不知能不能解决

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Same problem, OpenWrt is based on version 19.07, uses RSA 2048 key pair, juicessh and DaRemote can log in normally, but the same error occurs when using the latest Android version. By the way, the software does not seem to support directly importing the private key files of xshell and juicessh.

The xshell private key file structure is as follows:

-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,9F12066615EF50B4

......
-----END RSA PRIVATE KEY-----

Error message: Unsupported operation: Unsupported cipher:DES-EDE3-CBC

The juicessh private key file structure is as follows:

-----BEGIN PRIVATE KEY-----
......
-----END PRIVATE KEY-----

Error message: Unsupported operation: Unsupported key type:PRIVATE KEY

Find the solution. Just install openssh-server on openwrt. Dropbear will be automatically replaced (the public key path is different, remember to copy it to /root/.ssh first)
The core problem is that this software does not support dropbear. It is speculated that some versions of ssh consider rsa unsafe and reject it. I wonder if this can be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants