Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add SSH key as authorized key for Vagrant's root
Vagrant.configure(2) do |config|
id_rsa_pub ="#{Dir.home}/.ssh/")
config.vm.provision "copy ssh public key", type: "shell",
inline: "echo \"#{id_rsa_pub}\" >> /home/vagrant/.ssh/authorized_keys"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment