Merge "Have gitea sshd listen on 222"

This commit is contained in:
Zuul 2019-02-20 17:49:11 +00:00 committed by Gerrit Code Review
commit de69f35847
2 changed files with 35 additions and 0 deletions

View File

@ -70,6 +70,8 @@ RUN addgroup --system --gid 1000 git \
# Copy the /etc config files and entrypoint script
COPY --from=build-env /go/src/code.gitea.io/gitea/docker /
# Copy our custom sshd_config
COPY sshd_config /etc/ssh/sshd_config
# Copy the app
COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea

33
docker/gitea/sshd_config Normal file
View File

@ -0,0 +1,33 @@
Port 222
Protocol 2
AddressFamily any
ListenAddress 0.0.0.0
ListenAddress ::
LogLevel INFO
HostKey /data/ssh/ssh_host_ed25519_key
HostKey /data/ssh/ssh_host_rsa_key
HostKey /data/ssh/ssh_host_dsa_key
HostKey /data/ssh/ssh_host_ecdsa_key
AuthorizedKeysFile .ssh/authorized_keys
UseDNS no
AllowAgentForwarding no
AllowTcpForwarding no
PrintMotd no
PermitUserEnvironment yes
PermitRootLogin no
ChallengeResponseAuthentication no
PasswordAuthentication no
PermitEmptyPasswords no
AllowUsers git
Banner none
Subsystem sftp /usr/lib/ssh/sftp-server
AcceptEnv GIT_PROTOCOL