Restrict SSH login to only the public key method in Ubuntu December 27, 2023 nano /etc/ssh/sshd_config PermitRootLogin prohibit-password PasswordAuthentication no PubkeyAuthentication yes systemctl restart sshd Related