added log to allow external fail2ban

This commit is contained in:
2024-02-24 23:40:46 +02:00
parent 009abb6aae
commit f5829f0492
4 changed files with 10 additions and 2 deletions

View File

@@ -4,7 +4,9 @@ RUN apk add --no-cache \
openssh-server-pam \
bash \
rsync \
shadow
moreutils \
shadow \
tzdata
COPY get_pub_keys.sh update_users.sh run_ssh_box.sh /usr/local/sbin/
CMD bash /usr/local/sbin/run_ssh_box.sh

View File

@@ -59,4 +59,8 @@ echo "$NAME" > /etc/motd
update_users.sh
"/usr/sbin/sshd" "-D" "-e" "-f" "/etc/ssh/sshd_config"
touch /var/ssh-box/sshd.log
chmod 0600 /var/ssh-box/sshd.log
"/usr/sbin/sshd" "-D" "-e" "-f" "/etc/ssh/sshd_config" 2>&1 | \
ts "%b %d %H:%M:%S $HOSTNAME sshd[$$]:" | \
tee -a /var/ssh-box/sshd.log