I first say, thanks for your time, this may be a known issue but I couldn't find it the answer.

How to replicate:

  • copy your public SSH RSA key to ~/.ssh/authorized_keys
  • reboot ubuntu 12.04 desktop edition
  • try to ssh (it will prompt for password)

How to fix:

  • Go to the server and log into unity.
  • Now ssh public key auth works fine.

Alternate fix:

  • SSH the server
  • SSH it again, now public key auth will work fine.

This behavior is unusual (I'm a linux admin) hopefully someone knows a workaround?


Sounds like you probably used ecryptfs to encrypt your home directory. It's the "Encrypt your home directory?" option during the installation.

With this option enabled, your home directory (including .ssh/authorized_keys) can't be read until you've logged in once (either into Unity or via SSH with a password). This triggers the ecryptfs to be decrypted and mounted, making authorized_keys readable again.

Workaround: https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/362427/comments/12

  • Excellent, that makes total sense now. This box is actually a netbook that I converted to be a low-power server, I must have enabled encryption during install because I thought the device would be mobile. The workaround is verified, works fine now, thanks so much! – brian smith Jun 17 '13 at 18:37

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.