From b4732c45999278783c945a0f5f3a944684a6cab9 Mon Sep 17 00:00:00 2001 From: ScriptAutomate Date: Tue, 26 Sep 2023 17:13:31 -0500 Subject: [PATCH] Disable PasswordAuthentication on Windows --- os-images/AWS/windows/scripts/InstallAndConfigureOpenSSH.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/os-images/AWS/windows/scripts/InstallAndConfigureOpenSSH.ps1 b/os-images/AWS/windows/scripts/InstallAndConfigureOpenSSH.ps1 index 41825b420..821967cfb 100644 --- a/os-images/AWS/windows/scripts/InstallAndConfigureOpenSSH.ps1 +++ b/os-images/AWS/windows/scripts/InstallAndConfigureOpenSSH.ps1 @@ -140,6 +140,7 @@ LogLevel DEBUG3 '@ # Un-comment below for debug logs #$SSHD_CONFIG_EXTRA | Out-File -Append -FilePath $SSHD_CONFIG -Encoding ASCII +"PasswordAuthentication no" | Out-File -Append -FilePath $SSHD_CONFIG -Encoding ASCII # Ensure access control on administrators_authorized_keys meets the requirements $OPENSSH_UTILS_MODULE = [io.path]::combine($INSTALL_DIR, 'OpenSSHUtils.psd1')