vagrant-projects: OLCNE: merge #424 breaks build

Describe the issue

vagrant up fails after c330fff8039bc3ac389eb77ef14a588b1ef4e8ac

master1:     chmod 0700 /home/vagrant/.ssh
master1:     chmod 0600 /home/vagrant/.ssh/authorized_keys /home/vagrant/.ssh/id_rsa
master1:     chmod 0644 /home/vagrant/.ssh/authorized_keys /home/vagrant/.ssh/id_rsa.pub
master1:     eval echo "`hostname -s`,`hostname -f`,`hostname -i` `cat /etc/ssh/ssh_host_ed25519_key.pub`" >> /vagrant/known_hosts
master1: ===== Removing the shared SSH keypair =====
master1:     rm /vagrant/id_rsa /vagrant/id_rsa.pub
master1: ===== Copying SSH Host Keys =====
master1:     sudo cp /vagrant/known_hosts /etc/ssh/ssh_known_hosts
master1:     ssh 192.168.99.101 sudo cp /vagrant/known_hosts /etc/ssh/ssh_known_hosts
master1: Returned a non-zero code: 255
master1: Last output lines:
master1: Host key verification failed.
master1: See /var/tmp/cmd_OHxL8.log for details

The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

I believe we enabled StrictHostKeyChecking in that commit

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

Perfect. For now,

  1. Please delete id_rsa, id_rsa.pub and known_hosts from your vagrant project directory.
  2. Put back the previously comment-out lines:
    echo_do rm /vagrant/id_rsa /vagrant/id_rsa.pub
    echo_do rm /vagrant/known_hosts
  1. Replace the following line:
echo_do eval 'echo "`hostname -s`,`hostname -f`,`hostname -i` `cat /etc/ssh/ssh_host_ed25519_key.pub`" >> /vagrant/known_hosts'

with:

echo_do eval 'echo "`hostname -s`,`hostname -f`,`hostname -I|tr " " ","|sed "s/,$//"` `cat /etc/ssh/ssh_host_ed25519_key.pub`" >> /vagrant/known_hosts'
  1. Perform
vagrant destroy -f
vagrant up

And report back, so I can submit a PR.