Skip to content
MediumSSHBLWK-SSH-014

SSH key uses a weak algorithm: ‹path› ​

What this means ​

‹path› is a ‹key algorithm› key (‹key bits› bits for RSA). DSA keys are disabled by default in current OpenSSH, and RSA keys shorter than 2048 bits can be broken with affordable computing. Servers increasingly refuse both, and those that still accept them offer little protection.

How to fix it ​

Create a modern key, switch to it, then retire the old one.

  1. Run ssh-keygen -t ed25519 (with a passphrase) to create a new key.
  2. Add the new public key wherever the old one is accepted: servers' ~/.ssh/authorized_keys, GitHub, GitLab, and so on.
  3. Remove the old public key from those places, then delete the old key pair.

If something you connect to only supports RSA, use ssh-keygen -t rsa -b 4096 instead.

Check it yourself ​

Run a scan and look for BLWK-SSH-014 in the results:

sh
bulwark scan

Installed the standalone CLI package instead of the app? The command is bulwarkctl.

How Bulwark decides

Bulwark reads ssh_private_keys and reports this check when:

text
key_strength_known == true and (key_algorithm == "dsa" or (key_algorithm == "rsa" and key_bits < 2048))

If a value can't be read, Bulwark reports the check as undetermined rather than passing it. View the rule source.

References ​

Released under the Apache License 2.0.