Rather than create a new SSH key pair on a vagrant box, I would like to re-use the key pair I have on my host machine, using agent forwarding. I've tried setting config.ssh.forward_agent to TRUE in the Vagrantfile, then rebooted the VM, and tried using:
vagrant ssh -- -A
…but I'm still getting prompted for a password when I try to do a git checkout. Any idea what I'm missing?
Best Answer
I'm using vagrant 2 on OS X Mountain Lion.
config.ssh.private_key_path
is your local private keyssh-add -L
, if it's not listed add it withssh-add ~/.ssh/id_rsa
~/.ssh/authorized_keys
on the Vagrant VM. You can do it copy-and-pasting or using a tool like ssh-copy-id