wordpress icon indicating copy to clipboard operation
wordpress copied to clipboard

SSH agent to Vagrant does not always work

Open ottok opened this issue 4 years ago • 2 comments

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.

ottok avatar Sep 25 '20 21:09 ottok

We have not been able to reproduce this.

ottok avatar Jan 27 '21 13:01 ottok

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.

mattijv avatar Nov 05 '21 12:11 mattijv