update ssh location

16.4
Juanique Voogt 2024-09-26 16:28:51 +02:00
rodzic 9053aba212
commit f19c9c99db
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -119,12 +119,11 @@ RUN set -eux \
&& mkdir /var/run/sshd
# Configure SSH to allow root login and use public key authentication
RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config \
RUN echo 'PermitRootLogin no' >> /etc/ssh/sshd_config \
&& echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config \
&& echo 'PubkeyAuthentication yes' >> /etc/ssh/sshd_config \
&& echo 'AuthorizedKeysFile /shared-ssh/authorized_keys' >> /etc/ssh/sshd_config \
&& echo 'AllowTcpForwarding yes' >> /etc/ssh/sshd_config \
&& echo 'PermitEmptyPasswords yes' >> /etc/ssh/sshd_config
&& echo 'PermitEmptyPasswords no' >> /etc/ssh/sshd_config
# Set the root password to an empty string
RUN echo 'root:' | chpasswd -e