fixup permissions when installing keys
This commit is contained in:
parent
f83ec524bb
commit
a6b13228b5
1 changed files with 3 additions and 2 deletions
|
@ -79,9 +79,10 @@
|
|||
# Restore ssh host and user keys if they are available.
|
||||
# This avoids warnings of unknown ssh keys.
|
||||
boot.initrd.postMountCommands = ''
|
||||
mkdir -p /mnt-root/etc/ssh /mnt-root/root/.ssh
|
||||
mkdir -m 700 -p /mnt-root/root/.ssh
|
||||
mkdir -m 755 -p /mnt-root/etc/ssh
|
||||
if [[ -f /ssh/authorized_keys ]]; then
|
||||
cp ssh/authorized_keys /mnt-root/root/.ssh/
|
||||
install -m 400 ssh/authorized_keys /mnt-root/root/.ssh
|
||||
fi
|
||||
install -m 400 ssh/ssh_host_* /mnt-root/etc/ssh
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue