v1
This commit is contained in:
commit
8d4915543e
132 files changed
+20628
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# SSH target for the netssh test environment: every NetBox host, the bastion,
|
||||
# and the static host run this image with a different hostname.
|
||||
FROM alpine:3.24
|
||||
|
||||
# Alpine locks new accounts with "!"; sshd refuses key logins for locked
|
||||
# accounts, so the password field is set to "*" (no password, not locked).
|
||||
RUN apk add --no-cache openssh-server openssh-sftp-server python3 \
|
||||
&& for user in ops admin; do \
|
||||
adduser -D -s /bin/sh "$user" && sed -i "s/^$user:!/$user:*/" /etc/shadow; \
|
||||
done
|
||||
|
||||
COPY testenv/targets/sshd_config /etc/ssh/sshd_config
|
||||
COPY testenv/targets/entrypoint.sh /entrypoint.sh
|
||||
|
||||
EXPOSE 22 2222
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
Reference in new issue
Block a user