Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.


share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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