You are using the login account name of a valid account on the remote machine, and not the local machine on which you are currently typing? You are using the short user name (and not the long user name) of that valid account on the remote machine as the login username? And you are certain that the password you are entering is the correct password for that account on the remote machine?
you would have had to create a key pair using the ssh-keygen command, then transport the id_rsa.pub or id_dsa.pub to the server computer via memory stick or some other means, and then do
cat /Volumes/NameOfMemStick/id_rsa.pub >> ~.ssh/authorized_keys
cat /Volumes/NameOfMemStick/id_dsa.pub >> ~.ssh/authorized_keys2
(assuming that you physically delivered it to the other computer via memstick) depending on what kind of key pair you created.
I only use DSA keys to login to the servers I administrate. The command to generate a public and private key is
ssh-keygen -b 1024 -t dsa
you will then be prompted where to save the keys press enter to save them in the default location.
Generating public/private dsa key pair.
Enter file in which to save the key (/Users/user/.ssh/id_dsa):
The keys will then be saved
then you will be prompted to enter a passphrase. Dont enter a passphrase just press enter twice.
Enter passphrase (empty for no passphrase):
The terminal will now display the key fingerprint.
Now in your .ssh directory you need to copy id_dsa.pub to your user account on the server and add it to the file authorized_keys2
they way I do this is to use the scp command
scp /Users/user/.ssh/id_dsa.pub serveraddress:
I then ssh into the server and issue this command
cat id_dsa.pub >> /Users/user/.ssh/authorized_keys2
This is useful as it will add the key to the end of the file authorized_keys2. so if you add any subsequent keys you will not overwrite the previous key. This is useful if you login to servers from different computers.
Once you have your public key working you can disabled password authentication and use public key authentication only. This makes your server very secure.