summaryrefslogtreecommitdiffstats
path: root/container/sshd_config
blob: fca7e7bb46b1c5aad2540f4d118a8b1b9b4b9ee0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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:
#
#   environment="GIT_HOST_USER=alice",command="/usr/bin/git-shell",... ssh-ed25519 ...

AuthorizedKeysFile /run/git-host/secrets/authorized_keys

# Without this sshd silently drops the environment= option and every push arrives
# anonymous.  The usual objection does not apply: there is no login shell here
# (ForceCommand below), no writable files and no user rc file.

PermitUserEnvironment yes

# For a hand-added key that forgot its command= option: git transport, no shell.

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