From c35d7f21571f1746494a3f0fb99c612911c01809 Mon Sep 17 00:00:00 2001 From: miampf Date: Fri, 6 Dec 2024 11:55:57 +0100 Subject: [PATCH] `sshd` and `create-host-ssh-key` service on node --- .../usr/lib/systemd/system/create-host-ssh-key.service | 6 +++--- .../mkosi.skeleton => sysroot-tree}/etc/ssh/sshd_config | 0 2 files changed, 3 insertions(+), 3 deletions(-) rename image/{base/mkosi.skeleton => sysroot-tree}/etc/ssh/sshd_config (100%) diff --git a/image/base/mkosi.skeleton/usr/lib/systemd/system/create-host-ssh-key.service b/image/base/mkosi.skeleton/usr/lib/systemd/system/create-host-ssh-key.service index 084568705..4a23aba46 100644 --- a/image/base/mkosi.skeleton/usr/lib/systemd/system/create-host-ssh-key.service +++ b/image/base/mkosi.skeleton/usr/lib/systemd/system/create-host-ssh-key.service @@ -1,10 +1,10 @@ [Unit] Description=Create a host SSH key -Before=sshd.service +Before=network-pre.target [Service] Type=oneshot -ExecStart=ssh-keygen -t ecdsa -q -N "" /run/ssh_host_ecdsa_key +ExecStart=/bin/bash -c "ssh-keygen -t ecdsa -q -N '' -f /run/ssh_host_ecdsa_key" [Install] -WantedBy=multi-user.target +WantedBy=network-pre.target diff --git a/image/base/mkosi.skeleton/etc/ssh/sshd_config b/image/sysroot-tree/etc/ssh/sshd_config similarity index 100% rename from image/base/mkosi.skeleton/etc/ssh/sshd_config rename to image/sysroot-tree/etc/ssh/sshd_config