By default password based on login may be disabled on you Linux Server. Even though it is better to use private and public key for remote ssh login, there are times you need to use password based login. Here are steps to enable password login on Ubuntu Linux. For other flavours of Linux, the process should be similar.
Check ssh supported methods
Check ssh supported methods using:
$ ssh -o PreferredAuthentications=none localhost Permission denied (publickey).
If password is not present in supported methods in brackets above, that means ssh server does not support password based authentication.
Edit PasswordAuthentication value in sshd_config
Open /etc/ssh/sshd_config using sudo
$ sudo vi /etc/ssh/sshd_config
Change PasswordAuthentication value to yes
PasswordAuthentication yes
Restart ssh
Restart ssh using the following command:
$ sudo service ssh restart ssh stop/waiting ssh start/running, process 7068
Now check supported methods again:
$ ssh -o PreferredAuthentications=none localhost Permission denied (publickey,password).
This time you should see password in supported methods.