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 created a public/private key to authenticate myself to my web server via ssh, and that seemed to work fine at the time.

Since, every time I try to log on via ssh I have a heart attack because I get the infamous "Permission denied (public key)" message. I can try as many times as I like, but it does not log me on until I open the samba directory and log on to that in another window.

Is this a bug? Is there something I don't understand? Is ssh meant to refuse all connections until a user is logged on through another channel?

I'm confused.

share|improve this question
Have you disabled password access? – enzotib Oct 1 '11 at 14:49

This seems like it is an issue with your home directory being encrypted. ssh cannot read your key when the home directory has not been decrypted. When you log in from a local terminal (or samba) it decrypts your directory. The same is true with logging in with ssh using password auth. A solution is posted on SuperUser.

share|improve this answer

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.