I faced quite a few times the problem of copying files to virtual machines started via Vagrant. Since many people were facing the same issue, I’ve written a quick Vagrant plugin to solve this problem.
Install it via:
vagrant plugin install vagrant-scp
Use it like so:
vagrant scp <some_local_file_or_dir> <somewhere_on_the_vm> [vm_name]