From 576e5f97e04a9c861ea70aa4209f1bab909be277 Mon Sep 17 00:00:00 2001 From: Pedro Rodrigues Date: Sun, 25 Oct 2020 10:14:50 +0000 Subject: [PATCH] copy current ssh pub key to vagrant vm --- Vagrantfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index d40c820..ab2f329 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,6 +1,10 @@ Vagrant.configure("2") do |config| config.vm.box = "ubuntu/xenial64" config.vm.network "private_network", ip: "192.168.33.10" + config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/me.pub" + config.vm.provision "shell", inline: <<-SHELL + cat /home/vagrant/.ssh/me.pub >> /home/vagrant/.ssh/authorized_keys + SHELL config.vm.provider "virtualbox" do |vb| vb.memory = "1024" end