SSH connected FAILED with message: SSH_MSG_USERAUTH_FAILURE: publickey,password

There can be many issues with this, please note, if you are not seeing the 'publickey' in the message, this means you do not have publickey authentication turned on.


Solution #1
IP firewall - please make sure you have all of Ottomatik's IPs whitelisted:
http://support.ottomatik.io/servers/ip-addresses-for-ottomatik-servers

Solution #2
We can try updating the permissions of the authorized_keys file and also adjust some further settings to fix this.

$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys

Solution #3
If that does not solve the problem you may try temporarily setting StrictModes to no in /etc/ssh/sshd_config. If authentication with StrictModes off is successful, it is likely an issue with file permissions persists.


Solution #4
Make sure keys in ~/.ssh/authorized_keys are entered correctly and only use one single line.

Solution #5
You may want to use debug mode and monitor the output while connecting:

/usr/bin/sshd -d

Source: https://wiki.archlinux.org/index.php/SSH_keys

Did this answer your question?