Commit 1948f186 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Setup vagrant to use existing ssh key

Set insert_key to false, prevent vagrant from generating new key
then set our own ssh private key to be used, first priority
finally, copy our own ssh public key into vm as authorized key
parent 41e13514
......@@ -22,12 +22,15 @@ Vagrant.configure("2") do |config|
auto_correct: true
end
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.memory = "2048"
end
config.ssh.insert_key = false
config.ssh.private_key_path = ["~/.ssh/id_rsa", "~/.vagrant.d/insecure_private_key"]
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"
config.vm.provision "shell", inline: <<-SHELL
if [ -f /vagrant/localenv.sh ]; then
. /vagrant/localenv.sh
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment