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 \ openssh-server-pam \
bash \ bash \
rsync \ rsync \
shadow moreutils \
shadow \
tzdata
COPY get_pub_keys.sh update_users.sh run_ssh_box.sh /usr/local/sbin/ COPY get_pub_keys.sh update_users.sh run_ssh_box.sh /usr/local/sbin/
CMD bash /usr/local/sbin/run_ssh_box.sh CMD bash /usr/local/sbin/run_ssh_box.sh

View File

@@ -59,4 +59,8 @@ echo "$NAME" > /etc/motd
update_users.sh 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

View File

@@ -13,6 +13,7 @@ services:
- USR=${USR} - USR=${USR}
- NAME=${NAME} - NAME=${NAME}
- GRP=${GRP} - GRP=${GRP}
- TZ=${TZ}
restart: unless-stopped restart: unless-stopped

View File

@@ -2,3 +2,4 @@ USR=1000
GRP=1000 GRP=1000
EXPOSE=22222 EXPOSE=22222
NAME=BOX NAME NAME=BOX NAME
TZ=Europe/Copenhagen