]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ssh-generator: add missing newline before [Service] and trailing NL to generated...
authorMike Yuan <me@yhndnzj.com>
Wed, 28 May 2025 20:30:46 +0000 (22:30 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 25 Jun 2025 12:36:10 +0000 (13:36 +0100)
(cherry picked from commit e72bd8dbc867dbd68fa48b22f258feeb7760caa6)

src/ssh-generator/ssh-generator.c

index 551cbfcdaeba6b2edad52b9a55cee24c1caf01e8..d40c2fd8b9a1f7435a7513b82523719b7dc47195 100644 (file)
@@ -107,10 +107,11 @@ static int make_sshd_template_unit(
                         "[Unit]\n"
                         "Description=OpenSSH Per-Connection Server Daemon\n"
                         "Documentation=man:systemd-ssh-generator(8) man:sshd(8)\n"
+                        "\n"
                         "[Service]\n"
                         "ExecStart=-%s -i -o \"AuthorizedKeysFile ${CREDENTIALS_DIRECTORY}/ssh.ephemeral-authorized_keys-all .ssh/authorized_keys\"\n"
                         "StandardInput=socket\n"
-                        "ImportCredential=ssh.ephemeral-authorized_keys-all",
+                        "ImportCredential=ssh.ephemeral-authorized_keys-all\n",
                         sshd_binary);
 
                 r = fflush_and_check(f);