Browse Source

sshd: no longer accept RSA keys < 2048 bits for authentication

https://github.com/fphammerle/docker-borgbackup-sshd/commit/17b658f070505f80d8d48637785145a3c91fe171
Fabian Peter Hammerle 10 months ago
parent
commit
40d23bf8a8
2 changed files with 7 additions and 0 deletions
  1. 3 0
      CHANGELOG.md
  2. 4 0
      sshd_config

+ 3 - 0
CHANGELOG.md

@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
 ## [Unreleased]
+### Changed
+- `sshd`: no longer accept RSA keys < 2048 bits for authentication
+
 ### Fixed
 - `sshd_config`: added redundant settings blocking unused features
 - `docker-compose`: increased memory limit to support large repos and `git-remote-gcrypt`

+ 4 - 0
sshd_config

@@ -19,6 +19,10 @@ UsePAM no
 PermitRootLogin no
 AllowUsers git
 PubkeyAuthentication yes
+# > RSA: The length of the modulus n shall be 2048 bits or more to meet the
+# > minimum security-strength requirement of 112 bits [...]
+# https://csrc.nist.gov/publications/detail/sp/800-131a/rev-2/final
+RequiredRSASize 2048
 PasswordAuthentication no
 ChallengeResponseAuthentication no
 StrictModes no