diff options
Diffstat (limited to 'container/sshd_config')
| -rw-r--r-- | container/sshd_config | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/container/sshd_config b/container/sshd_config new file mode 100644 index 0000000..c180f50 --- /dev/null +++ b/container/sshd_config @@ -0,0 +1,35 @@ +Port 2222 +ListenAddress 0.0.0.0 +HostKey /run/git-host/secrets/ssh_host_ed25519_key +HostKey /run/git-host/secrets/ssh_host_rsa_key +PidFile /run/sshd/sshd.pid + +# One OS account for everyone; the *name* behind a key comes from the key +# itself. git-host-key writes +# +# environment="GIT_HOST_USER=alice",command="/usr/bin/git-shell",... ssh-ed25519 ... +# +# and git-authz reads GIT_HOST_USER out of the push environment. +AuthorizedKeysFile /run/git-host/secrets/authorized_keys + +# Without this line sshd silently drops the environment= key option, every +# connection arrives anonymous, and every push is denied. The usual objection +# does not apply here: the git account has no login shell worth having +# (ForceCommand below), no writable files and no user rc file. +PermitUserEnvironment yes + +# Belt and braces for a hand-added key that forgot its command= option: nobody +# gets a shell, only the git transport. +ForceCommand /usr/bin/git-shell + +PasswordAuthentication no +KbdInteractiveAuthentication no +ChallengeResponseAuthentication no +PermitRootLogin no +PermitTunnel no +AllowTcpForwarding no +X11Forwarding no +PermitTTY no +PrintMotd no +AllowUsers git +Subsystem sftp internal-sftp |
