Username and password combination is the most popular authentication method to SSH server and is normally enabled by default. Username and password authentication is also the most familiar method as it's widely used everywhere else.
Specifies whether password authentication is allowed. The default is yes.
Some administrators consider password login to be insecure due to improper password management by the users. As such, they might disable password authentication on your SSH servers and force users to authenticate using other methods such as the public key.
You can enable or disable password authentication by configuring the PasswordAuthentication directive in your SSH server.
$ sudo vi /etc/ssh/sshd_config [sudo] password for user:
Add the line if it doesn't already exist and remove # at the beginning of the line if it exists.
Set it to yes to allow password authentication method and no to disallow.
Make sure another authentication method is enabled and tested before disabling the password authentication method.
$ sudo systemctl restart sshd
Comment anonymously. Login not required.