diff --git a/image/base/mkosi.skeleton/etc/ssh/sshd_config b/image/base/mkosi.skeleton/etc/ssh/sshd_config new file mode 100644 index 000000000..4e298496b --- /dev/null +++ b/image/base/mkosi.skeleton/etc/ssh/sshd_config @@ -0,0 +1 @@ +HostKey /run/ssh_host_ecdsa_key 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 new file mode 100644 index 000000000..084568705 --- /dev/null +++ b/image/base/mkosi.skeleton/usr/lib/systemd/system/create-host-ssh-key.service @@ -0,0 +1,10 @@ +[Unit] +Description=Create a host SSH key +Before=sshd.service + +[Service] +Type=oneshot +ExecStart=ssh-keygen -t ecdsa -q -N "" /run/ssh_host_ecdsa_key + +[Install] +WantedBy=multi-user.target