I have recently bought a raspberry pi, and I have installed raspbian on it. I decided to change the default password, but after that every time I tried to login to ssh, it said permission denied. I tryed to change the password again, but it said invalid password. The only way I could change the password was with sudo. After that it worked a while but the next day it said invalid password again! I have no idea why it keeps changing but I need it to stop. Any ideas?Also, I have enabled ssh through raspi-config
You might check if the keyboard settings are correct. The default keyboard setup is English (UK). If you are setting your password from a layout other than English (UK), you will actually set your password to something different than you want. For instance, if you think you're typing an @ (shift + 2), you're actually typing ".
Keyboard layout can be changed through raspi-config. Hope this helps.
Are you connecting by WIFI? if so my answer might help as you need to do some setup.
Have you ever been able to SSH into the pi before the password change? If you have a keyboard and monitor setup run the raspi-config
The first option you can set "User password" for example for the username "pi".
then under "Interfacing Options" enable SSH.