Remove superfluous chmods

ssh-keygen already cares about the permission bits. Adding another chmod
600 on top of it is a noop
This commit is contained in:
Benedikt Heine 2024-12-02 21:32:28 +01:00
parent 89ae4455bb
commit bc3eb0a963

View file

@ -86,13 +86,10 @@ used flakes:
# ssh-host keys # ssh-host keys
install -d -m755 "$temp/etc/ssh" install -d -m755 "$temp/etc/ssh"
ssh-keygen -o -t rsa -a 100 -N "" -b 4096 -f "$temp/etc/ssh/ssh_host_rsa_key" ssh-keygen -o -t rsa -a 100 -N "" -b 4096 -f "$temp/etc/ssh/ssh_host_rsa_key"
chmod 600 "$temp/etc/ssh/ssh_host_rsa_key"
ssh-keygen -o -t ed25519 -a 100 -N "" -f "$temp/etc/ssh/ssh_host_ed25519_key" ssh-keygen -o -t ed25519 -a 100 -N "" -f "$temp/etc/ssh/ssh_host_ed25519_key"
chmod 600 "$temp/etc/ssh/ssh_host_ed25519_key"
# initrd key # initrd key
install -d -m755 "$temp/etc/secrets/initrd" install -d -m755 "$temp/etc/secrets/initrd"
ssh-keygen -o -t ed25519 -a 100 -N "" -f "$temp/etc/secrets/initrd/ssh_host_ed25519_key" ssh-keygen -o -t ed25519 -a 100 -N "" -f "$temp/etc/secrets/initrd/ssh_host_ed25519_key"
chmod 600 "$temp/etc/secrets/initrd/ssh_host_ed25519_key"
``` ```
1. existing host 1. existing host