Skip to content

Instantly share code, notes, and snippets.

@thinrhino
Forked from geedew/vagrant-scp
Last active August 29, 2015 14:07
Show Gist options
  • Save thinrhino/599d62baea93cd596a3e to your computer and use it in GitHub Desktop.
Save thinrhino/599d62baea93cd596a3e 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