Interview Prep/Linux/Networking, SSH and remote access

Your security team wants SSH hardened on all servers. What changes do you make?

BeginnerScenarioNetworking, SSH and remote access
Answer

Situation read → Disable weak paths, limit who can log in.

What I'd do → /etc/ssh/sshd_config.d/10-hardening.conf:

PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
PubkeyAuthentication yes
AllowGroups ssh-users
MaxAuthTries 3
LoginGraceTime 30
X11Forwarding no

Then sudo sshd -t && sudo systemctl reload sshd, and test from a second session before closing the first.

Why → Keys plus no root plus a group allowlist removes the most common brute-force and misuse paths.

Interview tip → Always keep an existing session open while changing sshd; that's the lockout insurance.

All Linux questions Roadmap: Linux

More on Networking, SSH and remote access