alphagov/gds-boxen — pull request #17 by philandstuff (2013-07-22 12:21:26+00:00)
Title: remove %r (remote user) from ssh_config ProxyCommands

The usage of %r here has the effect of presenting the same user to the
jumpbox as the target machine. That is, if I type the command

$ ssh ubuntu@foo.bar.preview

it will use a ProxyCommand which goes via
ubuntu@jumpbox-1.management.preview. This is not generally what I want
-- if I'm specifying a user, I want that user to apply only to the
target machine, not to the jumpbox in the ProxyCommand, since I
probably *don't* have credentials to run as
ubuntu@jumpbox-1.management.preview.

Also, ruby's Net::SSH reads the user .ssh/config file but while it
understands %h and %p, it doesn't understand the %r option. This
breaks the vcloud-provisioner.