infra4drache/docker/ssh/Dockerfile
Martyn Ranyard eef606b770 Allow Remote port binding
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
2023-02-11 15:22:10 +01:00

11 lines
401 B
Docker

FROM library/alpine
RUN apk add --no-cache openssh && \
sed -i /etc/ssh/sshd_config \
-e s/'#Port.*'/'Port 2222'/ \
-e s/'AllowTcpForwarding.*'/'AllowTcpForwarding yes'/ \
-e s/'GatewayPorts.*'/'GatewayPorts clientspecified'/ \
&& ssh-keygen -A
RUN adduser -D -s /bin/ash beagle
ADD beagle.key /home/beagle/.ssh/authorized_keys
RUN passwd -u beagle && \
chown -R beagle:beagle /home/beagle