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 kexand scan withssh-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.
More on Security, hardening and incident response
Monitoring shows a web server making outbound connections to an unknown IP on port 4444 at 2 AM. You suspect it is compromised. What do you do?AdvancedAfter the compromise you need to find how the attacker got in. Where do you look?AdvancedYour CISO asks you to harden a fresh Linux server baseline. What's on your list?IntermediateA developer says "SELinux keeps breaking my app, can we just disable it?" How do you respond and what do you do?IntermediateYou need to know when anyone modifies `/etc/sudoers`, `/etc/passwd` or SSH config. How?IntermediateA critical OpenSSL CVE is announced. How do you find and patch affected servers quickly?Intermediate