Skip to content

Commit

Permalink
create config path
Browse files Browse the repository at this point in the history
  • Loading branch information
timmy-wright committed Jan 15, 2025
1 parent 22550de commit 03461a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vhdbuilder/packer/configure-windows-vhd.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ function Install-OpenSSH {
# It’s by design that files within the C:\Windows\System32\ folder are not modifiable.
# When the OpenSSH Server starts, it copies C:\windows\system32\openssh\sshd_config_default to C:\programdata\ssh\sshd_config, if the file does not already exist.
$OriginalConfigPath = "C:\windows\system32\OpenSSH\sshd_config_default"
$ConfigPath = "C:\programdata\ssh\sshd_config"
$ConfigDirectory = "C:\programdata\ssh"
New-Item -ItemType Directory -Force -Path $ConfigDirectory
$ConfigPath = $ConfigDirectory + "\sshd_config"
Write-Log "Updating $ConfigPath for CVE-2023-48795"
$ModifiedConfigContents = Get-Content $OriginalConfigPath `
| %{$_ -replace "#RekeyLimit default none", "$&`r`n# Disable cipher to mitigate CVE-2023-48795`r`nCiphers [email protected]`r`nMacs -*[email protected]`r`n"}
Expand Down

0 comments on commit 03461a6

Please sign in to comment.