Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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@192.168.56.10'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? –  KevinSayHi May 13 '13 at 19:02
1  
See: askubuntu.com/questions/4950/… Make backups before you make any major changes. –  Zoredache May 13 '13 at 19:06
    
@Zoredache Thanks! –  KevinSayHi May 13 '13 at 19:07
add comment

1 Answer

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. –  KevinSayHi May 14 '13 at 2:09
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.