I recently did this, this may help you:
sshpass -p 'password' username@ipaddress
if this doesn't work then you'll have to generate keys in the other machine you want to connect with
ssh-keygen
it will generate private and public keys and ask you for a location, leave at empty it will save the keys in .ssh folder by default
it will ask you for passphrase, you can also leave it empty
the go in .ssh folder and change the public key name to 'authorized_keys'
cd .ssh/
mv id_rsa.pub authorized_keys
useradd -d /home/username username
this will add user to list
now go to home directory and give permission and restart sshd services
chmod 700 /home/username/.ssh
chmod 644 /home/username/.ssh/authorized_keys
chown root:root /home/dozee
sudo service sshd restart
now you will have to move the private key to the system at that location from where you are going to run the ssh command, then you can connect with
sshpass -p 'password' ssh -i id_rsa username@ip
if even that doesn't work then go in /etc/ssh open sshd_config with vim editor
check if the pubkeyAuthenticatoin is turned to yes or not, if not change it to yes , restart the sshd services and then try it, it will definitely work.