mitchellh/vagrant — pull request #1041 by vaimo-wilko (2012-07-25 15:05:36+00:00)
Title: Added support for downloading boxes via SCP

Since we have certain sensitive box files that we do not want on the open internet, we needed a way to add user authentication/authorization to box downloads.

We already have a good SSH key authentication framework in our infrastructure, so by using SCP we avoid having to set up a parallel authentication system via HTTP(S). With SCP we effectively get authentication/authorization for free.

I am contributing this, as this could be nice to have as a standard feature in Vagrant, for others to use too.

---
There is one thing currently not as I would like it to be, due to a bug/misfeature in Net::SSH. Unlike the command line SSH client, Net::SSH does not fall back to the currently logged in user, if no user is specified (either to the Net::SSH.start function or in the ssh config files).

This means that SCP URIs must be given a user (e.g. scp://user@host/path/to/file), if no user is specified in the ssh config file for the specific host.

I will submit a fix for this bug/misfeature to the Net::SSH project.