sshd_config 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # sync with https://github.com/fphammerle/docker-gitolite/blob/master/sshd_config
  2. LogLevel INFO
  3. #LogLevel DEBUG
  4. PidFile none
  5. Port 2200
  6. Protocol 2
  7. HostKey /etc/ssh/host_keys/rsa
  8. HostKey /etc/ssh/host_keys/ed25519
  9. # https://www.ssh-audit.com/hardening_guides.html#ubuntu_20_04_lts
  10. KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256
  11. Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
  12. MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com
  13. HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-512,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com
  14. #UsePAM no
  15. #PermitRootLogin no
  16. AllowUsers dump
  17. AuthenticationMethods publickey
  18. PubkeyAuthentication yes
  19. PasswordAuthentication no
  20. ChallengeResponseAuthentication no
  21. # dont check file permissions
  22. StrictModes no
  23. AllowAgentForwarding no
  24. AllowStreamLocalForwarding no
  25. AllowTcpForwarding no
  26. DisableForwarding yes
  27. GatewayPorts no
  28. PermitTunnel no
  29. X11Forwarding no
  30. PermitUserEnvironment no
  31. PrintMotd no
  32. PermitTTY no
  33. # .* matches until \0
  34. ForceCommand exec mysqldump $(grep -o 'MYSQLDUMP_ARGS=.*' /proc/1/environ | cut -d = -f 2-)