We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6906ecc + 85e6114 commit f69a26dCopy full SHA for f69a26d
cf_remote/Vagrantfile
@@ -26,7 +26,11 @@ Vagrant.configure("2") do |config|
26
node.vm.box = VM_BOX
27
28
node.vm.provision "shell" do |s|
29
- ssh_pub_key = File.readlines("#{Dir.home}/.ssh/id_rsa.pub").first.strip
+ ssh_pub_key_path = "#{Dir.home}/.ssh/id_rsa.pub"
30
+ if !File.file?(ssh_pub_key_path)
31
+ abort "SSH key not found at #{ssh_pub_key_path}. Please create one with: ssh-keygen -t rsa -b 4096"
32
+ end
33
+ ssh_pub_key = File.readlines(ssh_pub_key_path).first.strip
34
s.inline = <<-SHELL
35
echo #{ssh_pub_key} >> /home/vagrant/.ssh/authorized_keys
36
echo #{ssh_pub_key} >> /root/.ssh/authorized_keys
0 commit comments