Skip to content

Instantly share code, notes, and snippets.

@mykter
Forked from geedew/vagrant-scp
Last active August 29, 2015 14:10
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 mykter/225de4fe5ba536590005 to your computer and use it in GitHub Desktop.
Save mykter/225de4fe5ba536590005 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Change these settings to match what you are wanting to do
FILE=/File/To/Copy
SERVER=localhost
PATH=/Where/To/Put/File
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'`
scp ${OPTIONS} $FILE vagrant@$SERVER:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment