When attempting to add a key with ssh-add, ssh-add prints a nice big error message if the key files permissions are too liberal. However, it then proceeds to ask the user for a passphrase for the key. The passphrase is ignored and even a correct passphrase will result in "Bad passphrase, try again". This behaviour is damn confusing. :) Unless there is a good security reason for keeping it, it would be nice to have ssh-add not ask for the passphrase at all if the key is being ignored.
Created attachment 1049 [details] Check perms on key files and bail early if bad That behaviour is a side effect of the way ssh-add will try several times to load each key (first with no passphrase, then with the previously supplied passphrase then finally with the user-supplied passphrase). The attached patch ought to fix this.
Thanks Darren! I've applied the patch and recompiled and everything seems good. :)
Comment on attachment 1049 [details] Check perms on key files and bail early if bad looks ok
Applied, thanks. This will be 4.4.
With the release of 4.4, we believe that this bug is now closed. For information about the release please see http://www.openssh.com/txt/release-4.4 .