From f4e57410dc65c57a51a43cae45a374005104586b Mon Sep 17 00:00:00 2001 From: David Morgan Date: Tue, 15 Nov 2022 03:31:49 +0000 Subject: [PATCH] Fix ssh host key permissions on Oracle Linux (#120) --- nixos-infect | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos-infect b/nixos-infect index ac4e69a..2cab4cc 100755 --- a/nixos-infect +++ b/nixos-infect @@ -276,6 +276,10 @@ checkEnv() { req ip || { echo "ERROR: Missing ip"; return 1; } req awk || { echo "ERROR: Missing awk"; return 1; } req cut || req df || { echo "ERROR: Missing coreutils (cut, df)"; return 1; } + + # On some versions of Oracle Linux these have the wrong permissions, + # which stops sshd from starting when NixOS boots + chmod 600 /etc/ssh/ssh_host_*_key } infect() {