wordpress
wordpress copied to clipboard
SSH agent to Vagrant does not always work
One user reported that when running vagrant ssh
and then running various wp-pull-*
commands they all ask for password. However SSHing into the same remote server from outside the Vagrant box works.
Running ssh-add -L
inside the Vagrant box does not list any keys. Apparently SSH key forwarding does not always work despite being configured explicitly in the Vagrantfile
. This was on Vagrant 2.0.2, so it could not have been related to something new in Vagrant, but rather some kind of regression or situation that can breach ssh-agent.
We have not been able to reproduce this.
We are facing this issue in the vagrant up
stage when trying to pull the production DB. Even though the host has valid ssh keys, a password is needed to pull the DB.
After the VM is up and running, doing a vagrant ssh
and wp-pull-production-db
works with ssh keys as expected.