When setting sshd PasswordAuthentication to no has no effect

After setting up ssh authentication via public/private key for my user account on my Ubuntu 22.04 server, I wanted to disable authentication via password for security reasons. So in /etc/ssh/sshd_conf I changed the entry PasswordAuthentication from yes (the default) to no: [plain] # To disable tunneled clear text passwords, change to no here! PasswordAuthentication no … Continue reading When setting sshd PasswordAuthentication to no has no effect

Using two factor authentication for ssh with Ubuntu 22.04

Since many of the instructions I found on the internet seem to be flawed or at least outdated, here is how I managed to enable two factor authentication (2fa) with (time based) OTP in Ubuntu 22.04 using the Google Authenticator PAM plugin. Note: When using ssh private/public key based authentication, no OTP prompt will be … Continue reading Using two factor authentication for ssh with Ubuntu 22.04