Skip to content

Commit 821cdbe

Browse files
authored
Work around broken SSH login by disabling PAM for Fedora and Oracle (#82)
* Change: Disable PAM for Oracle to work around broken SSH login * Change: Disable PAM for Fedora to work around broken SSH login
1 parent 3caf6cd commit 821cdbe

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

operating_systems/fedora/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ RUN if [ "$UPDATED" = true ]; then dnf upgrade -y; fi \
1111
&& echo "demo:demo" | chpasswd \
1212
&& ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" \
1313
&& ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N "" \
14-
&& ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ""
14+
&& ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" \
15+
# Workaround to fix SSH login (see VTA-641)
16+
&& echo "UsePAM no" > /etc/ssh/sshd_config.d/01-disable-usepam.conf
1517

1618
CMD [ "/usr/sbin/sshd", "-D" ]
1719

operating_systems/oraclelinux/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ RUN if [ "$UPDATED" = true ]; then yum upgrade -y && yum clean all; fi \
99
&& echo "demo" | passwd --stdin demo \
1010
&& ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" \
1111
&& (ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N "" || true) \
12-
&& (ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || true)
12+
&& (ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N "" || true) \
13+
# Workaround to fix SSH login (see VTA-641)
14+
&& if [ -d /etc/ssh/sshd_config.d ]; then echo "UsePAM no" > /etc/ssh/sshd_config.d/01-disable-usepam.conf; \
15+
else sed -i "s/UsePAM yes/UsePAM no/" /etc/ssh/sshd_config; fi
1316

1417
CMD [ "/usr/sbin/sshd", "-D" ]
1518

0 commit comments

Comments
 (0)