Fix broken SSH Public Key Authentication

Sep 25, '07 07:30:00AM

Contributed by: Sesquipedalian

Ever since I learned of SSH, I have wanted to set it up so that I could automatically run remote commands (like rsync) on the other Macs on our home network. The proper way to do this, of course, is with passphrase-free public key authentication. But try as I might, I simply could not convince SSH to use public key authentication! Eventually I discovered the reason in an obscure mailing list: If permissions are set incorrectly on the home directory, SSH will refuse perfectly good authentication keys.

The solution: Open Terminal and type chmod g-w ~/.

SSH is now entirely happy to authenticate using keys.

[robg adds: Running Disk Utility's permissions repair should also fix home folder permissions, though I'm not 100% positive about that.]

Comments (10)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070923214135555