Disable ssh password login

Add a sshd config file with the following content

sudo nano /etc/ssh/sshd_config.d/99-ts.conf
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no

Reload the SSH daemon

sudo systemctl reload sshd

WARNING!
Now you are no longer able to create new session to that server!
Remember to add your ssh certificate before closing the session!


Revision #2
Created 22 October 2025 15:09:20 by Theis Villumsen
Updated 23 October 2025 09:04:04 by Theis Villumsen