commit d86d5b8dd1b7293a3c2366cdb05ce331b4026cf3
Author: Matthias Jaros <jaros@mailbox.org>
Date: Sat, 18 Oct 2025 14:35:18 +0200
Initial commit. WIP
Diffstat:
3 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/Dockerfile b/Dockerfile
@@ -0,0 +1,6 @@
+FROM alpine
+RUN apk add --no-cache openssh-server fish
+COPY ssh.conf /etc/ssh/sshd_config.d/
+COPY ./etc/ssh/ /etc/ssh/
+#ENTRYPOINT ["/usr/sbin/sshd", "-D", "-e"]
+ENTRYPOINT ["fish"]
diff --git a/init b/init
@@ -0,0 +1,17 @@
+#!/usr/sbin/env fish
+
+argparse 'u/users+' 'r/repos+' -- $argv
+
+# create users and copy keys in correct location, set permissions
+for user in $_flag_u
+ echo "Setting up user: $user"
+ set -l HOME="/home/$user"
+ adduser --home $HOME --disabled-password "$user"
+ mkdir "$HOME/.ssh"
+ cp "/srv/keys/$user" "$HOME/.ssh"
+ chown -R $user "$HOME"
+ chmod 700 "$HOME"
+end
+
+# run ssh daemon
+/usr/sbin/sshd -D -e
diff --git a/ssh.conf b/ssh.conf
@@ -0,0 +1,20 @@
+PermitRootLogin no
+PasswordAuthentication no
+
+HostKey /etc/ssh/ssh_host_rsa_key
+HostKey /etc/ssh/ssh_host_ecdsa_key
+HostKey /etc/ssh/ssh_host_ed25519_key
+
+# Logging
+SyslogFacility AUTH
+LogLevel INFO
+
+#PermitTTY yes
+#AllowAgentForwarding yes
+
+# Example of overriding settings on a per-user basis
+#Match User anoncvs
+# X11Forwarding no
+# AllowTcpForwarding no
+# PermitTTY no
+# ForceCommand cvs server