Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 am setting up ssh from OS X to a Ubuntu virtual machine (Virtual Box). I tried to set up key-based authentication, following the instructions here.

Now there is a problem. When my VM server is up running, and I am actually logged in at the server side, I can ssh without authentication. But when I log out at the server side (while the VM is still up), I cannot proceed without authentication:

no such identity: /Users/USER/.ssh/id_dsa: No such file or directory
no such identity: /Users/USER/.ssh/id_ecdsa: No such file or directory
USER@'s password: 

I can enter the password and log in without problem.

So, how can I change the configuration so that key authentication also works when I'm not logged in at the server side? From the message, there is no id_dsa. What I actually have in ~/.ssh is id_rsa, so what's their difference?

share|improve this question
Did you set up home directory encryption? If yes, that would be your problem. Your home directory doesn't get decrypted until after you are logged in. – Zoredache May 13 '13 at 19:00
@Zoredache Oh shoot... Exactly... So is there any way to stop encryption of home directory? – 4ae1e1 May 13 '13 at 19:02
See:… Make backups before you make any major changes. – Zoredache May 13 '13 at 19:06
@Zoredache Thanks! – 4ae1e1 May 13 '13 at 19:07

Well you don't have to stop your encryption, you can move the authorized_keys file to another directory like an /etc/ssh/$USER

share|improve this answer
Well I've already removed the encryption... Thank you anyway. Your answer is rather interesting. Say I have moved the file to another directory like /etc/ssh/$USER, do I need to adjust configuration of the ssh server? If so, how? Since I've already removed the encryption I can't test it out. – 4ae1e1 May 14 '13 at 2:09

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.