ssh: authenticate only with rsa key

0

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?

4ae1e1

Posted 2013-05-13T18:45:41.593

Reputation: 1 306

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 – 2013-05-13T19:00:45.783

@Zoredache
Oh shoot... Exactly... So is there any way to stop encryption of home directory?
– 4ae1e1 – 2013-05-13T19:02:55.743

1

See: http://askubuntu.com/questions/4950/how-to-stop-using-built-in-home-directory-encryption Make backups before you make any major changes.

– Zoredache – 2013-05-13T19:06:48.953

Answers

0

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

guest

Posted 2013-05-13T18:45:41.593

Reputation: 29

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 – 2013-05-14T02:09:43.500