Error: “Permission denied > (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive)” on Mountain Lion (10.8)

Standard

I use RSYNC over SSH & launchagents to keep my Casper distribution points in sync with the Master.

However on upgrading the master to 10.8.2, the SSH connection would error with the message:

“Permission denied > (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive)”

I re-ran through the steps i’d used previously.. reached out to JAMF support, JAMFNation & the MacEnterprise Mailing List.. still no joy..

So, it then started to think that maybe the change in OS for the master meant a change in method.. after Googling “mountain lion authorized_keys” I came across the below blog, with revealed the answer!

http://www.hkwebentrepreneurs.com/2012/08/password-free-ssh-on-os-x-mountain-lion.html

From the site:

SATURDAY, AUGUST 4, 2012

Password-Free SSH on OS X Mountain Lion

 
I had set up my home network with password-free ssh access between various Mac computers. But when I recently upgraded to OS X Mountain Lion, this stopped working.

 

Turns out /etc/sshd_config is modified during Mountain Lion installation. The following line gets unchecked:


# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile      .ssh/authorized_keys

Once I had renamed ~/.ssh/authorized_keys2 to ~/.ssh/authorized_keys on my Mountain Lion computers, everything worked fine again.

Reposting to hopefully save someone’s sanity!