eolas/neuron/6d4cfb04-1e87-477a-91e9-34c360bfb8ad/Disable_non-root_ssh_access.md
2025-03-27 19:06:04 +00:00

483 B

tags created
server-management
ssh
procedural
linux
Saturday, February 15, 2025

Disable non-root SSH access

Best practice is to:

  • Disallow root login
  • Block password-based login
  • Allow only SSH-based login

Do this by editing /etc/ssh/sshd_config:

PasswordAuthentication no
ChallengeResponseAuthentication no

Then restart the SSH service:

sudo systemctl restart sshd

(Assumes you have already set-up SSH-based login for a non-root user!)