Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cf_remote/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ Vagrant.configure("2") do |config|
node.vm.box = VM_BOX

node.vm.provision "shell" do |s|
ssh_pub_key = File.readlines("#{Dir.home}/.ssh/id_rsa.pub").first.strip
ssh_pub_key_path = "#{Dir.home}/.ssh/id_rsa.pub"
if !File.file?(ssh_pub_key_path)
abort "SSH key not found at #{ssh_pub_key_path}. Please create one with: ssh-keygen -t rsa -b 4096"
end
ssh_pub_key = File.readlines(ssh_pub_key_path).first.strip
s.inline = <<-SHELL
echo #{ssh_pub_key} >> /home/vagrant/.ssh/authorized_keys
echo #{ssh_pub_key} >> /root/.ssh/authorized_keys
Expand Down