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

1 Answer 1

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
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.