Open queglay opened 5 years ago
Hey there @queglay - What version of VirtualBox are you using? Have you tried upgrading to the latest version of that? Also, if you run vagrant ssh --debug
, you should be able to see the exact ssh
command vagrant is using to log into the box. If you run that yourself, do you experience the same issue? Thanks!
I neglected to mention that I do need to control my routes because it runs open vpn, as a router. I realised that the default route was 10.2.something.something I've been trying next this line out for the last three days to ensure the default route is actually 192.168.x.1, and its been stable-
config.vm.network "public_network", mac: mac_string, use_dhcp_assigned_default_route: true
Why do vagrant boxes change the default route? if this is indeed the fix its been a major source of pain for me to work this out, and I don't even know why it has fixed the problem.
I'm using the latest major version for those boxes- 5.2.30 when I went to a higher version than that I had other problems.
this problem has returned today. I was using a defined ip, and mac with this line
config.vm.network "public_network", ip: openfirehawkserver, mac: mac_string, use_dhcp_assigned_default_route: true
I also tried using an assigned ip from the router instead, but got a hang as soon as I ssh'd into the instance.
config.vm.network "public_network", mac: mac_string, use_dhcp_assigned_default_route: true, bridge: bridgenic
I also ran vagrant ssh --debug, ad aquired the command. it looked like this-
/usr/bin/ssh "vagrant@127.0.0.1" -p "2222" -o LogLevel=FATAL -o Compression=yes -o DSAAuthentication=yes -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i /somepath/machines/project/virtualbox/private_key
It hangs if I just use this command, and eventually throws back -
ssh_exchange_identification: read: Connection reset by peer
The vm interacts fine through the standard virtualbox window, so its to do with ssh.
Vagrant version
2.2.4
Host operating system
Macos 10.13.6
Guest operating system
bento/ubuntu16.04 & ubuntu/xenial64
Vagrantfile
Debug output
Cannot generate debugging info because ssh is broken, output below
Expected behavior
ssh should not hang
Actual behavior
after some intermittent period of time, the vagrant ssh session will hang.
interestingly, only vagrant ssh is broken. I can still ssh to the private IP on my local network as the vagrant user or another new user.
Steps to reproduce