Skip to content

Instantly share code, notes, and snippets.

@awm086
Created December 19, 2014 21:11
Show Gist options
  • Save awm086/1c6a43139f51567d83bd to your computer and use it in GitHub Desktop.
Save awm086/1c6a43139f51567d83bd to your computer and use it in GitHub Desktop.
Turn off StrictHostKeyChecking for vagrant user
# Turn off StrictHostKeyChecking for vagrant user
config.vm.provision :shell do |shell|
file = "/root/.ssh/config"
shell.inline = "mkdir -p /root/.ssh/ && touch #{file} " +
" && grep -q 'StrictHostKeyChecking' #{file} || echo 'StrictHostKeyChecking no' >> #{file}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment