diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2024-02-22 14:01:13 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-05-06 10:58:24 +0200 |
commit | b7b6bdc9e0748ff7657e1e2b14527a863f27b349 (patch) | |
tree | b6823dcbe7f733153396b1e39640f1a7bef8f6a2 /test/units/testsuite-74.ssh.sh | |
parent | TEST-75-RESOLVED: Ignore resource record ifindex field (diff) | |
download | systemd-b7b6bdc9e0748ff7657e1e2b14527a863f27b349.tar.xz systemd-b7b6bdc9e0748ff7657e1e2b14527a863f27b349.zip |
TEST-74-AUX-UTILS: Support credential-provided root SSH public key
When root authorized keys are provided by mkosi they are not
newline-terminated so appending a public key to the file results
in a corrupt key, so just to be safe we add an empty line.
Diffstat (limited to 'test/units/testsuite-74.ssh.sh')
-rwxr-xr-x | test/units/testsuite-74.ssh.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/units/testsuite-74.ssh.sh b/test/units/testsuite-74.ssh.sh index 70fb9ce56c..5d87d9f7ac 100755 --- a/test/units/testsuite-74.ssh.sh +++ b/test/units/testsuite-74.ssh.sh @@ -32,7 +32,9 @@ removesshid() { ssh-keygen -N '' -C '' -t rsa -f "$ROOTID" mkdir -p 0700 /root/.ssh -cat "$ROOTID".pub >> /root/.ssh/authorized_keys +# Add a newline in case authorized_keys wasn't terminated correctly. +echo >>/root/.ssh/authorized_keys +cat "$ROOTID".pub >>/root/.ssh/authorized_keys # set root pw to "foo", just to set it to something valid # shellcheck disable=SC2016 |