Skip to content

Commit a65de4a

Browse files
committed
fix: Remove use of DSA keys due to openssh deprecation
Signed-off-by: Jeff Neel <10672501+jeff350@users.noreply.github.com>
1 parent 057465d commit a65de4a

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

lib/kitchen/docker/helpers/dockerfile_helper.rb

-8
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def arch_platform
5757
RUN pacman-db-upgrade
5858
RUN pacman --noconfirm -Syu openssl openssh sudo curl
5959
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
60-
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
6160
RUN echo >/etc/security/limits.conf
6261
CODE
6362
end
@@ -82,7 +81,6 @@ def fedora_platform
8281
RUN dnf clean all
8382
RUN dnf install -y sudo openssh-server openssh-clients which curl
8483
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
85-
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
8684
CODE
8785
end
8886

@@ -91,7 +89,6 @@ def gentoo_platform
9189
RUN emerge-webrsync
9290
RUN emerge --quiet --noreplace net-misc/openssh app-admin/sudo
9391
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
94-
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
9592
CODE
9693
end
9794

@@ -100,7 +97,6 @@ def gentoo_paludis_platform
10097
RUN cave sync
10198
RUN cave resolve -zx net-misc/openssh app-admin/sudo
10299
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -A -t rsa -f /etc/ssh/ssh_host_rsa_key
103-
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -A -t dsa -f /etc/ssh/ssh_host_dsa_key
104100
CODE
105101
end
106102

@@ -118,7 +114,6 @@ def rhel_platform
118114
RUN yum clean all
119115
RUN yum install -y sudo openssh-server openssh-clients which curl
120116
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
121-
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
122117
CODE
123118
end
124119

@@ -128,7 +123,6 @@ def centosstream_platform
128123
RUN yum clean all
129124
RUN yum install -y sudo openssh-server openssh-clients which
130125
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
131-
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
132126
CODE
133127
end
134128

@@ -138,7 +132,6 @@ def almalinux_platform
138132
RUN yum clean all
139133
RUN yum install -y sudo openssh-server openssh-clients which
140134
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
141-
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
142135
CODE
143136
end
144137

@@ -148,7 +141,6 @@ def rockylinux_platform
148141
RUN yum clean all
149142
RUN yum install -y sudo openssh-server openssh-clients which
150143
RUN [ -f "/etc/ssh/ssh_host_rsa_key" ] || ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
151-
RUN [ -f "/etc/ssh/ssh_host_dsa_key" ] || ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
152144
CODE
153145
end
154146

test/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ FROM centos:7
22
RUN yum clean all
33
RUN yum install -y sudo openssh-server openssh-clients which curl htop
44
RUN ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
5-
RUN ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
65
RUN mkdir -p /var/run/sshd
76
RUN useradd -d /home/<%= @username %> -m -s /bin/bash <%= @username %>
87
RUN echo <%= "#{@username}:#{@password}" %> | chpasswd

0 commit comments

Comments
 (0)