mirror of
https://github.com/systemd/systemd.git
synced 2025-02-02 13:47:27 +03:00
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.
This commit is contained in:
parent
904fc035cb
commit
b7b6bdc9e0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user