Skip to content

Instantly share code, notes, and snippets.

@colindean
colindean / vagrant-scp.sh
Last active March 27, 2025 18:19
A quick way to transfer a file to the home directory on a Vagrant VM
#!/bin/sh
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'`
scp ${OPTIONS} "$@" || echo "Transfer failed. Did you use 'default:' as the target?"