Prerequisites
- SSH key authentication working
- Sudo privileges
Step 1: Edit SSH Config
sudo nano /etc/ssh/sshd_configStep 2: Disable Password Auth
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM noStep 3: Restart SSH
sudo systemctl restart sshd⚠️ Do NOT close your current SSH session until you have verified key login works in a new terminal.