I have just installed VirtualBox and Vagrant on my coputer and initialized a ubuntu/bento-16.04 box. I have added a new user beside vagrant user and I have generated and copied the public key on the server in a file named authorized_keys. I also disbaled the possibility to authenticate with a paswword.
The problem is that i can connect to the server only if a provide to the ssh command the full path to my private key (located on the C drive of my computer), under -i flag.
If a try to connect just with ssh -p 2222 lucian@localhost i got this message: permission denied(public key)
Is there any way i cann connect by ssh without providing the full path to the private key located on my computer?
My impression is that the server does not know about the location of the private key.
I red the earlier threads related to this issue but i can figure out what am I suppose to do to make the ssh-agent provide to the server the private key automatically.
Thanks!
IdentityFile /path/to/identity