I use ssh key authentication to rsync data from my weather station to it’s website.  Mysteriously it started failing a few days ago.  After a bit of hair pulling and unhelpful ssh -vvv output, I found the cause.  The permissions of the authorized_keys file on the server were incorrect.

-rw-rw-r–   1 stan4dnet pg478973  391 2008-05-07 12:14 authorized_keys

This file is readable by more than just you. Newer versions of ssh see this, recongize it as a security hole, and prevent you from doing something stupid.  Lesson Learned: Make sure that the files in .ssh are writable only by you, on both machines, and non-executable by anyone.

Some people recommend a simple “chmod 644 *” in your .ssh directories.  I don’t.  I recommend:

chmod 400 *