When setting up a new server, I generally want to allow logins only via key authentification and not from the root user. Therefore, I edit the sshd_config like this:
I change 'PermitRootLogin' to 'no' and uncomment 'PasswordAuthentification' and set this to 'no' as well. While this works very well and I've checked and found no way to login only via password, I was wondering why some guides recommend to set 'UsePAM' to 'no' while other guides don't mention it at all (and thereby keep it as 'yes'). There seems to be no clear opinion on whether the UsePAM setting should be changed when switching to key only auth.
What are the security implications of leaving UsePAM as it is ('yes'), if there are any at all?