Skip to content

Commit

Permalink
Fix ssh key setup
Browse files Browse the repository at this point in the history
  • Loading branch information
valtzu committed Apr 20, 2024
1 parent 295ec87 commit 6598185
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mkosi.finalize
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if zcat -t $BUILDROOT/usr/lib/modules/$kver/vmlinuz ; then
gzip -d $BUILDROOT/usr/lib/modules/$kver/vmlinuz.gz
fi

mkdir -pm 0700 /root/.ssh
mkdir -pm 0700 $BUILDROOT/root/.ssh
# todo: use $(jq -r '.SshKey' $MKOSI_CONFIG) instead of hardcoded mkosi.key once the fix is released https://github.com/systemd/mkosi/pull/2574
ssh-keygen -f $SRCDIR/mkosi.key -y > /root/.ssh/authorized_keys
chmod 0700 /root/.ssh/authorized_keys
ssh-keygen -f $SRCDIR/mkosi.key -y > $BUILDROOT/root/.ssh/authorized_keys
chmod 0700 $BUILDROOT/root/.ssh/authorized_keys

0 comments on commit 6598185

Please sign in to comment.