Skip to content

Instantly share code, notes, and snippets.

@Jaesin
Last active August 29, 2015 14:01
Show Gist options
  • Save Jaesin/fb323fdf37fbbb5481cc to your computer and use it in GitHub Desktop.
Save Jaesin/fb323fdf37fbbb5481cc to your computer and use it in GitHub Desktop.
Allow ssh forwarding in Vagrant during provisioning.
# Enable agent forwarding during provisioning.
config.vm.provision :shell do |shell|
shell.inline = "touch $1 && chmod 0440 $1 && echo $2 > $1"
shell.args = %q{/etc/sudoers.d/root_ssh_agent "Defaults env_keep += \"SSH_AUTH_SOCK\""}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment