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.
- Run
ssh-keygen -t ed25519(with a passphrase) to create a new key. - Add the new public key wherever the old one is accepted: servers' ~/.ssh/authorized_keys, GitHub, GitLab, and so on.
- 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 scanInstalled 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
Related checks
- SSH password authentication is enabled ·
BLWK-SSH-001 - SSH root login is permitted ·
BLWK-SSH-002 - SSH allows empty passwords ·
BLWK-SSH-003 - SSH X11 forwarding is enabled ·
BLWK-SSH-004 - SSH TCP forwarding/tunneling is enabled ·
BLWK-SSH-005 - SSH permits user-set environment variables ·
BLWK-SSH-006