hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.25k stars 4.43k forks source link

Vagrant 2.3.6 (and possibly 2.3.5) opts for keyboard-interactive over publickey for some SSH interactions #13191

Closed artlogic closed 1 year ago

artlogic commented 1 year ago

Debug output

https://gist.github.com/artlogic/32fbbf901c1e96b7c7be5e1819e12876

Expected behavior

vagrant upload should choose the privatekey method even when keyboard-interactive is present (as it did in 2.3.4). A password prompt should not appear.

Actual behavior

I'm prompted for a password in the midst of the upload. The publickey method should have been chosen, rather than keyboard-interactive. In 2.3.4 this is what happens, but in 2.3.6 keyboard-interactive is chosen and I'm prompted for the box password.

Reproduction information

Vagrant version

artlogic@atticus agent % vagrant -v
Vagrant 2.3.6

Host operating system

macOS 12.6.5.

Guest operating system

Ubuntu (hashicorp/bionic64)

Steps to reproduce

  1. vagrant init hashicorp/bionic64
  2. vagrant up
  3. touch test
  4. vagrant upload test test (no password prompt, works as expected)
  5. Enable keyboard-interactive
    1. vagrant ssh
    2. sudo nano /etc/ssh/sshd-config
    3. Scroll to the line that says ChallengeResponseAuthentication no. Change it to yes and save.
    4. sudo systemctl restart sshd
    5. exit
  6. vagrant upload test test you are now prompted for a password. This was not the behavior in 2.3.4 and prior.

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/bionic64"
end