Skip to content

boards/esp32c3-devkit: add Dropbear SSH server configuration#19062

Merged
acassis merged 2 commits into
apache:masterfrom
FelipeMdeO:feature/dropbear-esp32c3-port
Jun 27, 2026
Merged

boards/esp32c3-devkit: add Dropbear SSH server configuration#19062
acassis merged 2 commits into
apache:masterfrom
FelipeMdeO:feature/dropbear-esp32c3-port

Conversation

@FelipeMdeO

@FelipeMdeO FelipeMdeO commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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 dropbear defconfig is introduced for the ESP32-C3 DevKit board.
It wires up the Dropbear SSH server application together with:

  • SPIFFS on SPI flash (/data mountpoint) to persist the host key and
    the password database.
  • FSUTILS_PASSWD pointing to /data/passwd as the credential store,
    replacing a previous Dropbear-specific password-file path.
  • ECDSA host key stored at /data/dropbear_ecdsa_host_key.
  • NSH autostart of the dropbear task on every boot.
  • PTY support and Ctrl-C signal delivery enabled for interactive
    sessions.
  • CONFIG_NETUTILS_DROPBEAR_STACKSIZE pinned to 65536 bytes;
  • CONFIG_NETUTILS_DROPBEAR_LISTEN_RETRY_MAX=120 so the daemon keeps
    retrying until the Wi-Fi link is fully up.

Wi-Fi credentials (myssid / mypasswd) - Please remember give some connectivity to board.

Impact

  • New board configuration: the dropbear defconfig is additive and
    does not affect any existing configuration.
  • Build: no impact on boards or configurations that do not select
    CONFIG_NETUTILS_DROPBEAR.
  • Security: host keys and credentials live on a SPIFFS partition
    under /data; they are generated at first run and persist across
    reboots. 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:

./tools/configure.sh esp32c3-devkit:dropbear
make -j$(nproc)
make flash ESPTOOL_PORT=/dev/ttyUSB0

Boot log shows Dropbear listening after Wi-Fi association:

NuttShell (NSH) NuttX-12.x
nsh> Starting Dropbear SSH server
Dropbear listening on port 22

SSH connection from the host:

$ ssh -o StrictHostKeyChecking=no user@<board-ip>
user@<board-ip>'s password: <passwd>
NuttShell (NSH) NuttX-12.x
nsh>

@github-actions github-actions Bot added Size: M The size of the change in this PR is medium Area: Crypto Board: risc-v labels Jun 8, 2026
@fdcavalcanti

Copy link
Copy Markdown
Contributor

Very cool!
Please add documentation for this defconfig: Documentation/platforms/risc-v/esp32c3.

@FelipeMdeO FelipeMdeO marked this pull request as ready for review June 13, 2026 16:19
@FelipeMdeO FelipeMdeO force-pushed the feature/dropbear-esp32c3-port branch 4 times, most recently from d43dfaa to fc1e04d Compare June 13, 2026 20:27
@FelipeMdeO

FelipeMdeO commented Jun 13, 2026

Copy link
Copy Markdown
Contributor Author

Very cool! Please add documentation for this defconfig: Documentation/platforms/risc-v/esp32c3.

Hello, Documentation updated.

fdcavalcanti
fdcavalcanti previously approved these changes Jun 15, 2026
eren-terzioglu
eren-terzioglu previously approved these changes Jun 15, 2026
@fdcavalcanti

Copy link
Copy Markdown
Contributor

Please check CI

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

esp32-devkitc

  • ROM: .flash.text -8 B (-0.0%, 119,772 B / 4,194,272 B, total: 3% used)
  • irom0_0_seg: .flash.text -8 B (-0.0%, 85,052 B / 3,342,304 B, total: 3% used)

hifive1-revb

  • flash: .text +4 B (+0.0%, 80,196 B / 4,194,304 B, total: 2% used)

qemu-armv8a

  • Code: .rodata +8 B, .text.cmd_echo -16 B (-0.0%, 312,150 B)

qemu-intel64

  • Code: .text -3 B (-0.0%, 8,653,200 B)

rx65n-rsk2mb

@FelipeMdeO FelipeMdeO force-pushed the feature/dropbear-esp32c3-port branch 2 times, most recently from 327a8bf to 27a30fa Compare June 25, 2026 08:24
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation and removed Area: Crypto labels Jun 25, 2026
@acassis

acassis commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@FelipeMdeO please normalize boards/risc-v/esp32c3/esp32c3-devkit/configs/dropbear/defconfig it is reporting error on CI

@FelipeMdeO FelipeMdeO force-pushed the feature/dropbear-esp32c3-port branch from 27a30fa to 83f47b0 Compare June 27, 2026 14:54
Add a board configuration that enables the Dropbear SSH server on the ESP32-C3 DevKit with Wi-Fi networking and the required crypto support.

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>
@FelipeMdeO FelipeMdeO force-pushed the feature/dropbear-esp32c3-port branch from 83f47b0 to 0eacc59 Compare June 27, 2026 14:56
@FelipeMdeO

Copy link
Copy Markdown
Contributor Author

Hello @fdcavalcanti , @eren-terzioglu , nuttx-apps dropbear merged, now pipeline will complete properly

@linguini1 linguini1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super cool!!

@acassis acassis merged commit 3f00e60 into apache:master Jun 27, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Board: risc-v Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants