Interview Prep/Linux/Security, hardening and incident response

A pen test reports your servers accept weak SSH ciphers and old key exchange algorithms. How do you fix it?

IntermediateScenarioSecurity, hardening and incident response
Answer

Situation read → Restrict algorithms in sshd or system crypto policy.

What I'd do →

  • RHEL: sudo update-crypto-policies --set FUTURE (or a custom policy module), then restart sshd.
  • Others, in an sshd drop-in:
KexAlgorithms [email protected],curve25519-sha256
Ciphers [email protected],[email protected],[email protected]
MACs [email protected],[email protected]
HostKeyAlgorithms ssh-ed25519,rsa-sha2-512
  • Verify: ssh -Q kex and scan with ssh-audit host.

Why → Removing CBC ciphers, SHA-1 MACs and weak DH groups closes the findings.

Interview tip → Check old clients (legacy Java libraries, network gear) before rollout.

All Linux questions Roadmap: Linux

More on Security, hardening and incident response