diff options
| author | prospanclaudebot <[email protected]> | 2026-07-10 22:10:31 +0000 |
|---|---|---|
| committer | prospanclaudebot <[email protected]> | 2026-07-10 22:10:31 +0000 |
| commit | 966b62d9bd7e483f1e9484a5a99d8c2db475171c (patch) | |
| tree | df3a27730963d68d515272b4246dc79d96945744 /ssh/entrypoint.sh | |
| download | pacan-git-966b62d9bd7e483f1e9484a5a99d8c2db475171c.tar.gz pacan-git-966b62d9bd7e483f1e9484a5a99d8c2db475171c.zip | |
Diffstat (limited to 'ssh/entrypoint.sh')
| -rwxr-xr-x | ssh/entrypoint.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ssh/entrypoint.sh b/ssh/entrypoint.sh new file mode 100755 index 0000000..c255adf --- /dev/null +++ b/ssh/entrypoint.sh @@ -0,0 +1,20 @@ +#!/bin/sh +set -e +mkdir -p /repos /keys /home/git/.ssh /run/sshd +touch /keys/authorized_keys +chown -R git:git /home/git/.ssh 2>/dev/null || true +chmod 700 /home/git/.ssh +ssh-keygen -A +cat > /etc/ssh/sshd_config <<EOF +Port 22 +PermitRootLogin no +PasswordAuthentication no +PubkeyAuthentication yes +AllowUsers git +AuthorizedKeysFile /keys/authorized_keys +X11Forwarding no +AllowTcpForwarding no +AllowAgentForwarding no +EOF +echo "sshd up · authorized_keys=/keys/authorized_keys (пишет бот)" +exec /usr/sbin/sshd -D -e |
