Hi,
I recently ugraded from Ubuntu 20.04 to 22.04 (specifically pop os). I noticed vagrant doesn’t work anymore.
It seems to be an issue with the rubygem net-ssh giving error “pkeys are immutable on OpenSSL 3.0”.
Here’s the complete output of vagrant up:
`Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/focal64' version '20220324.0.0' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
/usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb:21:in `generate_key!': pkeys are immutable on OpenSSL 3.0 (OpenSSL::PKey::PKeyError)
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb:21:in `generate_key'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/kex/abstract.rb:32:in `initialize'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:437:in `new'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:437:in `exchange_keys'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:245:in `proceed!'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/algorithms.rb:184:in `accept_kexinit'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:210:in `block in poll_message'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:190:in `loop'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:190:in `poll_message'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:225:in `block in wait'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:223:in `loop'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:223:in `wait'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh/transport/session.rb:90:in `initialize'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh.rb:251:in `new'
from /usr/share/rubygems-integration/all/gems/net-ssh-6.1.0/lib/net/ssh.rb:251:in `start'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:467:in `block (2 levels) in connect'
from /usr/lib/ruby/3.0.0/timeout.rb:97:in `block in timeout'
from /usr/lib/ruby/3.0.0/timeout.rb:35:in `block in catch'
from /usr/lib/ruby/3.0.0/timeout.rb:35:in `catch'
from /usr/lib/ruby/3.0.0/timeout.rb:35:in `catch'
from /usr/lib/ruby/3.0.0/timeout.rb:112:in `timeout'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:433:in `block in connect'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/util/retryable.rb:17:in `retryable'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:432:in `connect'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:87:in `block in wait_for_ready'
from /usr/lib/ruby/3.0.0/timeout.rb:97:in `block in timeout'
from /usr/lib/ruby/3.0.0/timeout.rb:35:in `block in catch'
from /usr/lib/ruby/3.0.0/timeout.rb:35:in `catch'
from /usr/lib/ruby/3.0.0/timeout.rb:35:in `catch'
from /usr/lib/ruby/3.0.0/timeout.rb:112:in `timeout'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/plugins/communicators/ssh/communicator.rb:63:in `wait_for_ready'
from /usr/share/rubygems-integration/all/gems/vagrant-2.2.19/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call`
The only relevant thing I can find online is this.
As far as I understand (from this stackoverflow question) the problem is OpenSSL 3.0 breaking ruby-net-ssh. Is there any workaround possible here? Or should I just wait for a fix from Ubuntu/ruby-net-ssh?
Thanks in advance for the help