I am doing a computer vision project, and I have Vagrant VM on Ubuntu 20.04 VM on VirtualBox on Windows 11 Host Machine. I'd like to use the Windows 11 host machine for the CV since it needs a lot of processing power, and communicate with a python app in vagrant currently running using SSH, since it's not a very resource intensive app.
I have a port forwarded (8000 -> 8000) in virtual box to access the web interface of the app I need, and I can access it from my browser on Firefox in Windows 11.
The problem arises when I attempt to ssh into vagrant (2222->2222) putty gives an error for connection refused, windows cmd gives "kex_exchange_identification: read: Connection aborted"
I've tried getting private key, I've tried all variants of ssh commands that I could find, but it's simply not working. Inside Ubuntu I am able to simply type "vagrant ssh" and it will connect to the ssh without any delay.
Am I missing something?
I usually use WSL2 for programming in linux, but my particular application requires that it runs in vagrant in ubuntu.
port forwarding
vagrant ssh-config
config.vm.box = "generic/ubuntu2010"
# Publically forwarded ports.
# The below ports are accessible to all machines on the same network.
# To limit access to the local network, add "host_ip".
config.vm.network "private_network", type: "dhcp"
# Eg: config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
config.vm.network "forwarded_port", guest: 8000, host: 8000 # Web App
config.vm.network "forwarded_port", guest: 9000, host: 9000 # Remote server
#config.vm.network "forwarded_port", guest: 2222, host: 2222 # Remote server #<--this is commented because it didn't work, and vagrant's startup already specifies that it's forwarding port 22 to port 2222.
#config.vm.network "private_network", type: "dhcp" #<-- so is this
config.ssh.username = 'vagrant'
config.ssh.password = 'test'
config.ssh.insert_key = 'false'
Vagrant's Startup
Nevermind, I'm an idiot. Installed openssh in ubuntu and was able to access vagrant.