initial commit

This commit is contained in:
Frank Adaemmer 2022-11-29 20:23:44 +01:00
commit 790793ee20
3 changed files with 48 additions and 0 deletions

15
Dockerfile Normal file
View file

@ -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"]

3
entrypoint Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
exec /usr/sbin/sshd -D -e

30
sshd_config Normal file
View file

@ -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