0

I've been troubleshooting an issue with Vagrant,

$ vagrant ssh
OpenSSL version mismatch. Built against 100020ef, you have 1000106f
$

but if I build the corresponding ssh command manually with the parameters provided by vagrant ssh-config this succeeds (alternatively these are provided if I do vagrant ssh --debug : the final line before it attempts connection contains all the parameters it uses). What makes it even more puzzling is that the versions of openssh and OpenSSL match on the Virtualbox host and client machines (don't be thrown by the 1.0.2n and 1.1.1 differing between ssh and OpenSSL results, it turns out these do play together OK) - the point is that the commands below give the same results on the host and the client,

$ ssh -V
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017

$ openssl version
OpenSSL 1.1.1  11 Sep 2018

This is on a Mint 19.3 - so Ubuntu 18.04-based system.

In fact I did find the answer so it's posted below to hopefully help you avoid wasting too much time tracking down any similar issue.

Andrew Richards
  • 336
  • 3
  • 9

1 Answers1

0

(Answer updated after further tests)

The vagrant binary was the problem.

I was using the Oracle-packaged version of Virtualbox (6.1) using their repo (see their Virtualbox downloads page) rather than the Ubuntu-packaged version (currently at version 5.2); I had downloaded a new vagrant binary from https://www.vagrantup.com/downloads (vagrant_2.2.14_linux_amd64.zip) since the Ubuntu repo version of Vagrant didn't work with VirtualBox 6.1.

After testing I found that the newest versions of vagrant don't work in this environment (failing with the OpenSSL mismatch error above), but some do (versions 2.2.7 through to 2.2.10): Versions below 2.2.7 don't work with Virtualbox 6.1; versions above 2.2.10 exhibit the above OpenSSL version mismatch error.

So the 2 possible solutions are (I've tried both; both work):

  • Downgrade Virtualbox by sticking to the Ubuntu-packaged versions of Virtualbox and vagrant (and any vagrant add-ons; vagrant-cachier in my case) (make sure to clear out newer versions of Virtualbox and Vagrant thoroughly if so)
  • or continue with Virtualbox 6.1 but install a working vagrant version, 2.2.10 is the newest of the compatible versions; find it here: Download Older Versions of Vagrant

Re. installing vagrant, I removed the older Ubuntu-packaged vagrant (sudo apt remove vagrant) before I downloaded and unzipped vagrant_2.2.10_linux_amd64.zip although there is also a .deb available if you prefer; I put this in /usr/local/bin where it can be found on the PATH without being mistaken for a binary installed from a .deb.

Andrew Richards
  • 336
  • 3
  • 9