moved config steps into separate scripts
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64) (push) Successful in 37s
Container Publish / build-image (amd64) (push) Successful in 50s
Container Publish / update docker manifest (push) Successful in 16s

This commit is contained in:
2025-07-31 09:29:04 +02:00
parent d5a452dbf8
commit 13d29c224a
9 changed files with 222 additions and 151 deletions

View File

@@ -0,0 +1,19 @@
#!/bin/sh
echo "# Configuring ssh"
for keytype in ecdsa rsa ed25519 ; do
if [ ! -r "/ssh/ssh_host_${keytype}_key" ] ; then
/usr/bin/ssh-keygen -t "${keytype}" -f "/ssh/ssh_host_${keytype}_key" -N ""
fi
chmod 0600 "/ssh/ssh_host_${keytype}_key"
chmod 0644 "/ssh/ssh_host_${keytype}_key.pub"
done
# set authorized_keys permissions
if [ -f /ssh/authorized_keys ] ; then
chmod 0600 /ssh/authorized_keys
chown "${USERNAME}:${GROUPNAME}" /ssh/authorized_keys
fi
chmod 0700 "${PATH_WEBROOT}/.ssh"