Could you provide a bit more detail? Are you saying you are having trouble logging in via SFTP, and that it tells you your password is wrong when you try and do that, but you can still log in via the terminal when you are physically at the machine?
If so, are you able to ssh into the machine? From the terminal, try [CMD="ssh"]localhost[/CMD] and see if you are able to successfully log in. Judging from the fact that sftp doesn't work, this will probably fail.
If so, please say what sort of error you are getting. Do you get a login prompt at all? If so, are you trying to log in as root? Posting a copy of your /etc/ssh/sshd_config might help.