Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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

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
add comment

Your Answer

 
discard

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.