Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump OpenSSH to v9.5.0.0p1-beta and fix its installation on nanoserver #403

Merged
merged 4 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions windows/nanoserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,18 @@ ENV JENKINS_AGENT_USER ${user}
ENV JENKINS_AGENT_WORK ${JENKINS_AGENT_WORK}

# Setup SSH server
ARG OPENSSH_VERSION=V8.6.0.0p1-Beta
ARG OPENSSH_VERSION=v9.5.0.0p1-Beta
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
$url = 'https://github.com/PowerShell/Win32-OpenSSH/releases/download/{0}/OpenSSH-Win64.zip' -f $env:OPENSSH_VERSION ; `
Write-Host "Retrieving $url..." ; `
Invoke-WebRequest -Uri $url -OutFile C:/openssh.zip -UseBasicParsing ; `
Expand-Archive c:/openssh.zip 'C:/Program Files' ; `
Remove-Item C:/openssh.zip ; `
$env:PATH = '{0};{1}' -f $env:PATH,'C:\Program Files\OpenSSH-Win64' ; `
& 'C:/Program Files/OpenSSH-Win64/Install-SSHd.ps1' ; `
if(!(Test-Path 'C:\ProgramData\ssh')) { New-Item -Type Directory -Path 'C:\ProgramData\ssh' | Out-Null } ; `
icacls 'C:\ProgramData\ssh' /inheritance:d ; `
icacls 'C:\ProgramData\ssh' /remove 'CREATOR OWNER' ; `
& 'C:/Program Files/OpenSSH-Win64/Install-SSHd.ps1' ; `
Copy-Item 'C:\Program Files\OpenSSH-Win64\sshd_config_default' 'C:\ProgramData\ssh\sshd_config' ; `
$content = Get-Content -Path "C:\ProgramData\ssh\sshd_config" ; `
$content | ForEach-Object { $_ -replace '#PermitRootLogin.*','PermitRootLogin no' `
Expand Down
2 changes: 1 addition & 1 deletion windows/windowsservercore/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ RUN $CurrentPath = (Get-Itemproperty -path 'hklm:\system\currentcontrolset\contr
& C:\mingit\cmd\git.exe lfs install

# Setup SSH server
ARG OPENSSH_VERSION=V8.6.0.0p1-Beta
ARG OPENSSH_VERSION=v9.5.0.0p1-Beta
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
$url = 'https://github.com/PowerShell/Win32-OpenSSH/releases/download/{0}/OpenSSH-Win64.zip' -f $env:OPENSSH_VERSION ; `
Write-Host "Retrieving $url..." ; `
Expand Down