boards/esp32c3-devkit: add Dropbear SSH server configuration#19062
Open
FelipeMdeO wants to merge 2 commits into
Open
boards/esp32c3-devkit: add Dropbear SSH server configuration#19062FelipeMdeO wants to merge 2 commits into
FelipeMdeO wants to merge 2 commits into
Conversation
Contributor
|
Very cool! |
5b5478a to
d43dfaa
Compare
Add the ESP32-C3 dropbear board defconfig and the ChaCha20-Poly1305 crypto helpers (crypto/chachapoly.c) used by the apps Dropbear port. Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
Describe how to enable and use the Dropbear SSH server on the ESP32-C3 DevKit, including Wi-Fi, host key, and login configuration. Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
d43dfaa to
fc1e04d
Compare
Contributor
Author
Hello, Documentation updated. |
fdcavalcanti
approved these changes
Jun 15, 2026
eren-terzioglu
approved these changes
Jun 15, 2026
Contributor
|
Please check CI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two related changes that together bring up an SSH server
on the ESP32-C3 DevKit board using the Dropbear application:
boards/risc-v/esp32c3/esp32c3-devkit/configs/dropbear
A new
dropbeardefconfig is introduced for the ESP32-C3 DevKit board.It wires up the Dropbear SSH server application together with:
bring-up at boot).
/datamountpoint) to persist the host key andthe password database.
FSUTILS_PASSWDpointing to/data/passwdas the credential store,replacing a previous Dropbear-specific password-file path.
/data/dropbear_ecdsa_host_key.dropbeartask on every boot.sessions.
CONFIG_NETUTILS_DROPBEAR_STACKSIZEpinned to 65536 bytes; thedefault 32 KiB overflows during key exchange on this RISC-V target.
CONFIG_NETUTILS_DROPBEAR_LISTEN_RETRY_MAX=120so the daemon keepsretrying until the Wi-Fi link is fully up.
Wi-Fi credentials (
myssid/mypasswd) - Please remember give some connectivity to board.crypto: expose ChaCha20 stream helpers
Dropbear uses the
chacha20-poly1305@openssh.comcipher, which requiresa stateful, multi-call ChaCha20 stream interface rather than the single-
block interface currently exposed by
crypto/chachapoly.c. Three helpersand a context struct are added:
struct chacha20_stream_ctx— opaque wrapper aroundchacha_ctx.chacha20_stream_setkey()— initialise the key.chacha20_stream_ivctr64()— set IV and 64-bit counter.chacha20_stream_crypt()— encrypt/decrypt an arbitrary-length buffer.All three functions are thin wrappers over the existing
chacha_*primitives; no new algorithm code is introduced.
Impact
dropbeardefconfig is additive anddoes not affect any existing configuration.
include/crypto/chachapoly.h. The change is purely additive; existingusers of
chacha20_setkey/chacha20_cryptare unaffected.CONFIG_NETUTILS_DROPBEAR.under
/data; they are generated at first run and persist acrossreboots. Wi-Fi credentials must be provisioned by the user before
flashing.
Testing
Host: Linux x86_64, GCC RISC-V toolchain
Board: ESP32-C3 DevKit (rev 0.4)
This PR should be tested with source code available in apache/nuttx-apps#3532
Build:
Boot log shows Dropbear listening after Wi-Fi association:
SSH connection from the host: