I have a use case where I occasionally want to copy a single file from my host machine to the Vagrant guest.
I don\'t want to do so via traditional provisioners (Pup
if for some reasons you don't have permission to use
vagrant plugin install vagrant-scp
there is an alternative way :
First vagrant up yourVagrantProject, then write in the terminal :
vagrant ssh-config
you will have informations about "HostName" and "Port" of your virtual machine.
In some case, you could have some virtual machines in your project. So just find your master-machine (in general, this VM has the port 2222 ), and don't pay attention to others machines informations.
write the command to make the copy :
scp -P xxPortxx /Users/where/is/your/file.txt vagrant@xxHostNamexx:/home/vagrant
At this steep you will have to put a vagrant password : by default it's "vagrant"
after that if you look at files in your virtual machine:
vagrant ssh xxVirtualMachineNamexx
pwd
ls
you will have the "file.txt" in your virtual machine directory