Copy file from host to vagrant

Email this to someoneShare on Google+Share on FacebookTweet about this on TwitterShare on LinkedIn

Problem

You would like to quickly copy a file from the local host to the vagrant machine.

Solution

Find the private key, ssh and IP port with ssh-config:

Copy the file using the private key as a parameter to scp:

Taken from the answer here