Skip to content

Commit c03842e

Browse files
feat(debos/rootfs): add openssh-server and disable it by default.
Install openssh-server for convenience while ensuring it is disabled by default. Remove host keys generated during build and add a sanity check to prevent shipping images with pre-generated SSH keys. Signed-off-by: Niranjan Vemana <nvemana@qti.qualcomm.com>
1 parent 874cb4c commit c03842e

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ Once the image has booted, you can log in as the `debian` user, with the
263263
default `debian` password. The image should then ask you to change this default
264264
password to a safe one.
265265
266+
Note: "openssh server is installed but disabled by default; enable with "systemctl enable --now ssh" as root user".
267+
266268
## Development
267269
268270
Want to join in the development? Changes welcome! See [CONTRIBUTING.md file](CONTRIBUTING.md) for step by step instructions.

debos-recipes/qualcomm-linux-debian-rootfs.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ actions:
200200
# convenience networking commands (arp, ifconfig, route etc.)
201201
- net-tools
202202
- openssh-client
203+
# disabled by default
204+
- openssh-server
203205
# lspci
204206
- pciutils
205207
- rfkill
@@ -212,6 +214,18 @@ actions:
212214
- vulkan-tools
213215
- wget
214216

217+
- action: run
218+
description: Disable ssh by default and sanitize ssh keys
219+
chroot: true
220+
command: |
221+
set -eux
222+
systemctl disable ssh
223+
if [ -f /etc/ssh/ssh_host_* ]; then
224+
echo "ERROR: SSH host keys were unexpectedly generated" >&2
225+
exit 1
226+
fi
227+
rm -rf /home/*/.ssh
228+
215229
- action: run
216230
description: Add default user to docker group
217231
chroot: true

0 commit comments

Comments
 (0)