ribbons / android-dropbear

Build script and configuration to cross-compile Dropbear for Android.
MIT License
30 stars 12 forks source link

dbclient always exit with error: No auth methods could be used #34

Closed venssy closed 1 year ago

venssy commented 1 year ago

I connet my server by DROPBEAR_PASSWORD=password dbclient username@192.168.0.105, and catch result like this: dbclient: Connection to venssy@192.168.0.105:22 exited: No auth methods could be used. RUN ON Android11.

ribbons commented 1 year ago

This is a side-effect of dbclient password authentication being disabled in these builds (as Android doesn't provide a getpass() implementation we're setting DROPBEAR_CLI_PASSWORD_AUTH to 0 so the build doesn't fail). Key-based authentication definitely does work if that's an option for your use-case.

It would be possible for a change to be made to the dbclient source so that password authentication via DROPBEAR_PASSWORD could be enabled without getpass() being available on a platform (perhaps some conditional compilation based on the value of HAVE_GETPASS which looks like it might already be set automatically?) but I think that should be decided and handled upstream. I'd of course be happy to make any necessary adjustments at this end once that had been merged upstream.

Do you think it would be a good idea to mention this limitation in the readme to save others running into this problem in the future?

venssy commented 1 year ago

Thanks for your reply, I luckly found another source that can use DROPBEAR_PASSWORD to auth my server, the executable provided is good, but for my unfamiliarity on c, I mignt not go futher to compile by myself, maybe you can take a look, the git url is https://gitlab.com/fengshaun/android-dropbear

ribbons commented 1 year ago

Yes, I'm aware of a few other projects which maintain modified derivatives of Dropbear with additional features. For this project my aim is to provide up-to-date builds of the upstream project for Android and maintaining larger out-of-tree patches rather goes against that as it increases the effort required for each new release.