Skip to content

Instantly share code, notes, and snippets.

@gonzalo-trenco
Created August 13, 2018 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gonzalo-trenco/a8ceb0cd7cd763d1844879669910c40e to your computer and use it in GitHub Desktop.
Save gonzalo-trenco/a8ceb0cd7cd763d1844879669910c40e to your computer and use it in GitHub Desktop.
Copy file from local to vagrant VM
#!/bin/sh
OPTIONS=`vagrant ssh-config | tail -n +2 | awk -v ORS=' ' '{print "-o " $1 "=" $2}'`
scp ${OPTIONS} /File/To/Copy vagrant@YourServer:/Where/To/Put/File
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment