From 93933af0d0b30f269b141dae157fd9490edb1420 Mon Sep 17 00:00:00 2001 From: bom Date: Wed, 13 Jul 2022 10:56:44 +0200 Subject: [PATCH] Invert check for ssh hardening config configureSsh() was never actually doing anything, as the hardening config does not exist in a default ssh setup. --- .../domaindrivenarchitecture/provs/server/infrastructure/ssh.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/ssh.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/ssh.kt index e1f2203..6f05497 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/ssh.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/server/infrastructure/ssh.kt @@ -25,7 +25,7 @@ fun Prov.isSshdHardeningConfigExisting(): Boolean { } fun Prov.configureSsh() = task { - if(isSshdConfigExisting() && isSshConfigExisting() && isSshdHardeningConfigExisting() && isPackageInstalled(packageNameSshServer)) { + if(isSshdConfigExisting() && isSshConfigExisting() && !isSshdHardeningConfigExisting() && isPackageInstalled(packageNameSshServer)) { createFileFromResource( pathSshConfig, "ssh_config",