Skip to content

Commit 7d19a98

Browse files
committed
DLPX-94126 LTS 24.04: Engine|Challenge/Response prompt not occurring for external DCoA os-upgrade variants
1 parent d38e1d5 commit 7d19a98

File tree

2 files changed

+34
-54
lines changed
  • files/common
    • etc/ssh/sshd_config.d
    • var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks

2 files changed

+34
-54
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# Configure SSH to allow PAM "conversations" (interactions with the user).
3+
#
4+
ChallengeResponseAuthentication yes
5+
KbdInteractiveAuthentication yes
6+
UsePam yes
7+
8+
#
9+
# Harden the appliance by disabling ssh-agent(1), tcp, UNIX domain, and X11
10+
# forwarding. Note that this doesn't improve security unless users are also
11+
# denied shell access.
12+
#
13+
AllowAgentForwarding no
14+
AllowStreamLocalForwarding no
15+
AllowTcpForwarding no
16+
X11Forwarding no
17+
18+
Ciphers [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
19+
KexAlgorithms curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
20+
21+
HostKeyAlgorithms -ssh-rsa*
22+
23+
#
24+
# The 'ClientAliveInterval' setting determines the amount of time (in seconds)
25+
# the sshd server will wait to receive data from the client before sending a
26+
# request for response.
27+
#
28+
ClientAliveCountMax 3
29+
ClientAliveInterval 300
30+
31+
LoginGraceTime 60
32+
MaxAuthTries 4
33+
MaxStartups 10:30:60
34+
PermitRootLogin no

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml

-54
Original file line numberDiff line numberDiff line change
@@ -232,56 +232,6 @@
232232
- 'delphix'
233233
- 'root'
234234

235-
#
236-
# The 'ClientAliveInterval' setting determines the amount of time
237-
# (in seconds) the sshd server will wait to receive data from the
238-
# client before sending a request for response.
239-
#
240-
- set_fact:
241-
ssh_client_alive_interval: "300"
242-
ssh_client_alive_count_max: "3"
243-
244-
#
245-
# With that said (see comment above), the Azure marketplace does not
246-
# allow a value greater than 3 minutes. So, when running on Azure, we
247-
# use 3 minutes.
248-
#
249-
- set_fact:
250-
ssh_client_alive_interval: "180"
251-
ssh_client_alive_count_max: "0"
252-
when:
253-
- platform == "azure"
254-
255-
- lineinfile:
256-
path: /etc/ssh/sshd_config
257-
regexp: "^#?{{ item.key }} "
258-
line: "{{ item.key }} {{ item.value }}"
259-
with_items:
260-
#
261-
# Configure SSH to allow PAM "conversations" (interactions with the user).
262-
#
263-
- { key: "ChallengeResponseAuthentication", value: "yes" }
264-
#
265-
# Harden the appliance by disabling ssh-agent(1), tcp, UNIX domain, and
266-
# X11 forwarding. Note that this doesn't improve security unless users are
267-
# also denied shell access.
268-
#
269-
- { key: "AllowAgentForwarding", value: "no" }
270-
- { key: "AllowStreamLocalForwarding", value: "no" }
271-
- { key: "AllowTcpForwarding", value: "no" }
272-
- { key: "Ciphers", value: "[email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]" }
273-
- { key: "ClientAliveCountMax", value: "{{ ssh_client_alive_count_max }}" }
274-
- { key: "ClientAliveInterval", value: "{{ ssh_client_alive_interval }}" }
275-
- { key: "HostKeyAlgorithms", value: "-ssh-rsa*" }
276-
- { key: "KexAlgorithms", value: "curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256"}
277-
- { key: "LoginGraceTime", value: "60"}
278-
- { key: "MACs", value: "[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512"}
279-
- { key: "MaxAuthTries", value: "4" }
280-
- { key: "MaxStartups", value: "10:30:60"}
281-
- { key: "PermitRootLogin", value: "no" }
282-
- { key: "X11Forwarding", value: "no" }
283-
notify: "sshd config changed"
284-
285235
- blockinfile:
286236
path: /etc/profile
287237
insertafter: EOF
@@ -318,10 +268,6 @@
318268
# like last-login, "welcome to ubuntu", and help messages. This makes linux and
319269
# illumos look the same, too.
320270
#
321-
- replace:
322-
dest: /etc/ssh/sshd_config
323-
regexp: '^#?[\s]*PrintLastLog.*$'
324-
replace: 'PrintLastLog no'
325271
- replace:
326272
dest: /etc/pam.d/sshd
327273
regexp: '^(session[\s]+optional[\s]+pam_motd\.so.*)$'

0 commit comments

Comments
 (0)