From d6e41445aa6a24afa2d675f21c7e2691d086f348 Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Wed, 28 Feb 2024 15:54:24 +0100 Subject: [PATCH] REmove noloing. --- Dockerfile | 2 +- start.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5fae49c..729b420 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ LABEL OpenSSH="8.0p1" LABEL Tini="0.19.0" LABEL Name="CentOS OpenSSH" LABEL VERSION="2" -LABEL build_date="2023-06-13" +LABEL build_date="2024-02-28" ENV TINI_VERSION v0.19.0 diff --git a/start.sh b/start.sh index 1ca49bc..eb7d083 100644 --- a/start.sh +++ b/start.sh @@ -2,7 +2,7 @@ # Making all required files if they are not existing. (This means # you may add a Docker volume on /etc/ssh or /root to insert your -# own files. +# own files.) test -f /etc/ssh/ssh_host_ecdsa_key || /usr/bin/ssh-keygen -q -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -C '' -N '' test -f /etc/ssh/ssh_host_rsa_key || /usr/bin/ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N '' test -f /etc/ssh/ssh_host_ed25519_key || /usr/bin/ssh-keygen -q -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -C '' -N '' @@ -19,5 +19,8 @@ chown -R root:root /root/.ssh /usr/bin/echo "Please save the printed private RSA key and login using:" /usr/bin/echo "\"ssh -i \${savedkey} root@\${ipaddress}\"" +# Remove /run/nologin, normally removed by systemd-user-sessions. +rm /run/nologin + # Now start ssh. /usr/sbin/sshd -D