···11+Port 2222
22+33+HostKey /ssh-keys/ssh_host_rsa_key
44+HostKey /ssh-keys/ssh_host_ecdsa_key
55+HostKey /ssh-keys/ssh_host_ed25519_key
66+77+PasswordAuthentication no
88+99+Match User git
1010+ AuthorizedKeysCommand /usr/local/sbin/sshd-keys-wrapper
1111+ AuthorizedKeysCommandUser git
1212+1313+AllowTcpForwarding no
1414+GatewayPorts no
1515+X11Forwarding no
+22
containers/knot/start.sh
···11+#!/bin/ash
22+set -e
33+44+if [ ! -f /ssh-keys/ssh_host_rsa_key ]; then
55+ ssh-keygen -t rsa -f /ssh-keys/ssh_host_rsa_key -q -N ""
66+fi
77+if [ ! -f /ssh-keys/ssh_host_ecdsa_key ]; then
88+ ssh-keygen -t ecdsa -f /ssh-keys/ssh_host_ecdsa_key -q -N ""
99+fi
1010+if [ ! -f /ssh-keys/ssh_host_ed25519_key ]; then
1111+ ssh-keygen -t ed25519 -f /ssh-keys/ssh_host_ed25519_key -q -N ""
1212+fi
1313+1414+/usr/sbin/sshd -f /sshd_config &
1515+sshd_pid=$!
1616+1717+/usr/sbin/knot server &
1818+server_pid=$!
1919+2020+# Wait for any of the two background commands to exit and exit the container if that happens.
2121+wait -n $sshd_pid $server_pid
2222+exit $?