diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4bbfa09..85397b2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,7 @@ jobs: fail-fast: false matrix: include: + - { target: qemux86-64, distro-release: "2026", distro-channel: next } - { target: qemux86-64, distro-release: "2024", distro-channel: next } uses: avocado-linux/actions/.github/workflows/extension-test.yml@v1 with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 56d5f73..8ba2556 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to avocado-ext-sshd-dev are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.1] + +### Added +- sshd also reads authorized keys from `/var/lib/ssh/authorized_keys.d/` + (`/etc/ssh/sshd_config.d/50-avocado-authorized-keys.conf`). The root + filesystem is read-only, so `~/.ssh/authorized_keys` cannot be written for + root; `/var` is writable and survives reboots and OS updates. Ship keys with + the runtime's `var_files` or write them at provisioning. +- CI builds against the 2026 feed as well as 2024. + ## [0.1.0] ### Added diff --git a/avocado.yaml b/avocado.yaml index 4d0f06d..2c70fba 100644 --- a/avocado.yaml +++ b/avocado.yaml @@ -2,7 +2,7 @@ supported_targets: '*' extensions: avocado-ext-sshd-dev: - version: 0.1.0 + version: 0.1.1 release: r0 summary: SSH server with root login description: SSH server that allows root login with no password. DO NOT USE IN PRODUCTION. diff --git a/overlay/etc/ssh/sshd_config.d/50-avocado-authorized-keys.conf b/overlay/etc/ssh/sshd_config.d/50-avocado-authorized-keys.conf new file mode 100644 index 0000000..c8f5ade --- /dev/null +++ b/overlay/etc/ssh/sshd_config.d/50-avocado-authorized-keys.conf @@ -0,0 +1,13 @@ +# Avocado: read keys from /var as well as ~/.ssh. +# +# The root filesystem is read-only, so a home directory on it (root's is +# /root) cannot hold ~/.ssh/authorized_keys. /var/lib/ssh/authorized_keys.d/ +# is writable and survives reboots and OS updates; put each user's keys in +# a file named for the user (e.g. .../authorized_keys.d/root), shipped with +# the runtime's var_files or written at provisioning. Per-user files keep one +# account's keys from opening another. StrictModes applies: the directory and +# files must be owned by root (or the user) and not group/world writable. +# +# sshd keeps the first value it sees and sshd_config Includes this directory +# first, so this takes precedence over sshd_config's own AuthorizedKeysFile. +AuthorizedKeysFile .ssh/authorized_keys /var/lib/ssh/authorized_keys.d/%u