Enable SSH password auth for specifc users and public key auth for the rest

As the title says, is it possible to have say, user1 authenticated via a password and the rest like user2 using public key? example: ssh [email protected] would result in [email protected]’s password: ssh [email protected] would result in [email protected]: Permission denied (publickey). or if the key matches then it would directly login.

Details