From 36ddf7491f8887921d7033739fcca013d31f9399 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Wed, 1 Jun 2022 10:08:42 +0200 Subject: [PATCH] Remove ssh legacy fix for Ubuntu Server 22.04 (#5645) --- images.CI/linux-and-win/build-image.ps1 | 3 --- images/linux/scripts/base/configure-legacy-ssh.sh | 4 ---- images/linux/ubuntu2204.pkr.hcl | 6 ------ 3 files changed, 13 deletions(-) delete mode 100644 images/linux/scripts/base/configure-legacy-ssh.sh diff --git a/images.CI/linux-and-win/build-image.ps1 b/images.CI/linux-and-win/build-image.ps1 index 27b414d8fff3..932745d09f79 100644 --- a/images.CI/linux-and-win/build-image.ps1 +++ b/images.CI/linux-and-win/build-image.ps1 @@ -19,9 +19,6 @@ if (-not (Test-Path $TemplatePath)) exit 1 } -# Set Image repository path env variable, this is a workaround for Ubuntu 22.04 until this is fixed https://github.com/hashicorp/packer/issues/11733 -$env:ImageRepositoryPath = "." - $Image = [io.path]::GetFileName($TemplatePath).Split(".")[0] $TempResourceGroupName = "${ResourcesNamePrefix}_${Image}" $InstallPassword = [System.GUID]::NewGuid().ToString().ToUpper() diff --git a/images/linux/scripts/base/configure-legacy-ssh.sh b/images/linux/scripts/base/configure-legacy-ssh.sh deleted file mode 100644 index a59e9b7d41cd..000000000000 --- a/images/linux/scripts/base/configure-legacy-ssh.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -e -# https://github.com/hashicorp/packer/issues/11656 -echo PubkeyAcceptedKeyTypes=+ssh-rsa >> /etc/ssh/sshd_config -systemctl reload sshd.service \ No newline at end of file diff --git a/images/linux/ubuntu2204.pkr.hcl b/images/linux/ubuntu2204.pkr.hcl index 570629ed98cb..d21eb0d3b505 100644 --- a/images/linux/ubuntu2204.pkr.hcl +++ b/images/linux/ubuntu2204.pkr.hcl @@ -60,11 +60,6 @@ variable "image_os" { default = "ubuntu22" } -variable "image_repository_path" { - type = string - default = "${env("IMAGEREPOSITORYPATH")}" -} - variable "image_version" { type = string default = "dev" @@ -165,7 +160,6 @@ source "azure-arm" "build_vhd" { subscription_id = "${var.subscription_id}" temp_resource_group_name = "${var.temp_resource_group_name}" tenant_id = "${var.tenant_id}" - user_data_file = "${var.image_repository_path}/images/linux/scripts/base/configure-legacy-ssh.sh" virtual_network_name = "${var.virtual_network_name}" virtual_network_resource_group_name = "${var.virtual_network_resource_group_name}" virtual_network_subnet_name = "${var.virtual_network_subnet_name}"