commit 790793ee20b070624674b45b21e15645b1ce6d23 Author: Frank Adaemmer Date: Tue Nov 29 20:23:44 2022 +0100 initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bf8e5f1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM debian:buster-slim + +RUN apt update && \ + apt upgrade -y && \ + apt -y install openssh-server && \ + rm -rf /var/lib/apt/lists/* && \ + mkdir -p /run/sshd + +COPY sshd_config /etc/ssh/sshd_config +COPY entrypoint / + +EXPOSE 22 + +ENTRYPOINT ["/entrypoint"] + diff --git a/entrypoint b/entrypoint new file mode 100755 index 0000000..b502e6c --- /dev/null +++ b/entrypoint @@ -0,0 +1,3 @@ +#!/bin/bash +exec /usr/sbin/sshd -D -e + diff --git a/sshd_config b/sshd_config new file mode 100644 index 0000000..a53088f --- /dev/null +++ b/sshd_config @@ -0,0 +1,30 @@ +HostKey /etc/ssh/ssh_host_rsa_key +HostKey /etc/ssh/ssh_host_ecdsa_key +HostKey /etc/ssh/ssh_host_ed25519_key +SyslogFacility AUTHPRIV +PermitRootLogin no +AuthorizedKeysFile .ssh/authorized_keys +PasswordAuthentication yes +ChallengeResponseAuthentication no +GSSAPIAuthentication yes +GSSAPICleanupCredentials no +UsePAM yes +X11Forwarding no +PrintMotd no +AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES +AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT +AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE +AcceptEnv XMODIFIERS +Subsystem sftp /usr/libexec/openssh/sftp-server +Match Group sftponly + ChrootDirectory /srv + ForceCommand internal-sftp + AllowTcpForwarding no + X11Forwarding no + +Match Group extsftponly + ChrootDirectory %h + ForceCommand internal-sftp + AllowTcpForwarding no + X11Forwarding no +