Dropbear SSH on the install prefix¶
Status: VERIFIED on 55PUS8000/12, firmware
TPA256E_V056.002.236.191, 2026-11-10. SSH survives a cold boot with the USB
removed.
Build¶
Zig 0.17.1, target aarch64-linux-musl, Dropbear commit 17549ea6, bundled
libtom, no zlib/syslog/pam. Two default_options.h macros carry the
/mtd_rwarea/apdat/opt/bin prefix. Full record:
evidence/install/ssh-build.txt.
dropbearmulti 729,504 B aarch64 static-pie no INTERP/NEEDED
sha256 0f1fa428c012ea977335e504c882c9e9205f86f6c6a172c271ca2d5a98c7699c
Install¶
| Path | Purpose |
|---|---|
opt/bin/dropbearmulti |
server and dropbearkey applet |
opt/etc/dropbear/ed25519_host_key |
host key, generated on-device, 600 |
opt/root_home/.ssh/authorized_keys |
client key(s), 600 |
opt/etc/profile.d/opt-bin.sh |
login-shell PATH drop-in |
opt/var/dropbear.log |
server log |
opt/disabled |
kill switch (any file) |
Three failures and fixes¶
-
authorized_keys rejected when outside the home dir. With
-D /mtd_rwarea/apdat/opt/etc/ssh, Dropbear checks every path component.apdatis 777, so it refused with... opt/etc must be owned by user or root, and not writable by group or others. The default~/.sshinside a controlled home fixes this. -
PATH missing
opt/bin./etc/profileresetsPATH, and Dropbear setsDEFAULT_ROOT_PATHfor non-interactive commands. Two changes cover both cases: a bind mount ofopt/etc/profile.dover/etc/profile.dfor login shells, and a rebuild withDEFAULT_ROOT_PATH/DEFAULT_PATHprefixed byopt/binforssh host 'cmd'. -
Boot resets permissions.
/mtd_apexe/board/run.sh:587runschmod 777 -R /mtd_apdat/on every boot. A bind-mounted/rootbecomes group/other-writable, and Dropbear rejects/root/.ssh. The fix mounts a 700 tmpfs over/rootat boot and copiesauthorized_keysinto it (600). The tmpfs sits outsideapdat, so the vendorchmodcannot reset it.
evidence/install/ssh-live.txt records all three.
Cold boot¶
Evidence: evidence/install/ssh-boot.txt.
| Check | Result |
|---|---|
/media/sda1 |
absent (no USB) |
/root |
tmpfs … mode=700 |
/root/.ssh |
700, key 600 |
command -v lsblk |
/mtd_rwarea/apdat/opt/bin/lsblk |
root_boot.ready |
READY … uptime=12.41 |
| SSH | uid=0(root), key auth succeeded |
Persistence¶
root_boot.sh runs after the driver marker and a 5 s delay:
payloads/root_boot.opt-block.shmounts the 700 tmpfs on/root, copiesauthorized_keys, and sets 700/700/600;- the same block seeds and bind-mounts
opt/etc/profile.d, then re-asserts its modes; - it inserts the
:2222firewall ACCEPT rules; - it starts Dropbear unless
opt/disabledexists or:2222is already listening.
Backups: root_boot.sh.bak-before-ssh-20261110T125842Z and
root_boot.sh.bak-before-ssh-tmpfs-*. sh -n passed on the workstation and
on the device.
Security¶
- Publickey only (
-s). Password auth stays off. - Port 2222, LAN only. Do not forward it.
- Telnet
:2323stays up as the recovery shell. - Kill switch: create
opt/disabledand reboot. apdatis world-writable, so any local user who can write it can changeopt/root_home/.ssh/authorized_keysbefore the boot copy. The tmpfs copy fixes the permissions Dropbear checks; it does not fix the source. Treatapdatas a trusted path.
Rollback¶
cp -a /mtd_rwarea/apdat/root_boot.sh.bak-before-ssh-tmpfs-<stamp> \
/mtd_rwarea/apdat/root_boot.sh
# kill the running server by PID, then cold boot
Open¶
Telnet remains plaintext. Disable it once you no longer need the fallback.